aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librc/librc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 9da1757f..f9bf5082 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -481,7 +481,8 @@ rc_runlevel_exists(const char *runlevel)
char path[PATH_MAX];
struct stat buf;
- if (!runlevel || strcmp(runlevel, ".") == 0 || strcmp(runlevel, "..") == 0)
+ if (!runlevel || strcmp(runlevel, "") == 0 || strcmp(runlevel, ".") == 0 ||
+ strcmp(runlevel, "..") == 0)
return false;
snprintf(path, sizeof(path), "%s/%s", RC_RUNLEVELDIR, runlevel);
if (stat(path, &buf) == 0 && S_ISDIR(buf.st_mode))