From fe96617f78dfef3a95da786c0dd709fb01de2750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Tue, 13 Feb 2018 15:17:18 +0000 Subject: [PATCH] ENOENT for opendir() is not a fail for gt_show() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/show.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/show.c b/src/show.c index 33f8c62..888092b 100644 --- a/src/show.c +++ b/src/show.c @@ -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; }