diff options
Diffstat (limited to 'src/librc/librc.c')
-rw-r--r-- | src/librc/librc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index 15309f87..dbabdc03 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -289,7 +289,9 @@ bool rc_service_exists (const char *service) service[len - 1] == 'h') return (false); - file = rc_service_resolve (service); + if (! (file = rc_service_resolve (service))) + return (false); + if (stat (file, &buf) == 0 && buf.st_mode & S_IXUGO) retval = true; free (file); |