From 227dda34f78d1babea7831e2feac0f4a3f9e34ac Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 12 Oct 2017 01:23:16 +0200 Subject: [PATCH] cond_set_path(): Log error if unlink() fails Signed-off-by: Joachim Nilsson --- src/cond-w.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cond-w.c b/src/cond-w.c index 65b59312..765cc27e 100644 --- a/src/cond-w.c +++ b/src/cond-w.c @@ -55,7 +55,8 @@ int cond_set_path(const char *path, enum cond_state new) break; case COND_OFF: - unlink(path); + if (unlink(path)) + _pe("Failed removing condition '%s'", path); break; default: