ENOENT for opendir() is not a fail for gt_show()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-02-13 15:17:18 +00:00
parent 3c2423a38b
commit fe96617f78

View File

@@ -72,7 +72,9 @@ gt_show(int argc, char **argv)
DIR *dp = opendir("/run/" PACKAGE_NAME);
if (!dp) {
perror("opendir");
if (errno == ENOENT)
return 0;
perror("show");
return 1;
}