ENOENT for opendir() is not a fail for gt_show()
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
@@ -72,7 +72,9 @@ gt_show(int argc, char **argv)
|
|||||||
DIR *dp = opendir("/run/" PACKAGE_NAME);
|
DIR *dp = opendir("/run/" PACKAGE_NAME);
|
||||||
|
|
||||||
if (!dp) {
|
if (!dp) {
|
||||||
perror("opendir");
|
if (errno == ENOENT)
|
||||||
|
return 0;
|
||||||
|
perror("show");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user