check if file exists and default to character representation if it doesn't
This commit is contained in:
parent
510cc745cf
commit
b38dd088f5
5
bar.c
5
bar.c
@ -281,6 +281,11 @@ bool get_image_file(char *str, char *optend, char **end)
|
|||||||
img_file = p;
|
img_file = p;
|
||||||
*end = trail + 1;
|
*end = trail + 1;
|
||||||
|
|
||||||
|
/* Check if the image exists. */
|
||||||
|
if (access(img_file, F_OK) == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user