diff options
author | Roy Marples <roy@marples.name> | 2007-10-04 19:43:01 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-04 19:43:01 +0000 |
commit | 7319c64cffca2c14ad1c7afe329d59389f60ff83 (patch) | |
tree | 2f2782bfdbcf0e7d2d0d76727243cc2021274060 /src/librc.c | |
parent | a6f2713002db20cd65618c1140ed7d3fbbbb9292 (diff) |
rc_service_schedule_clear returns a bool on error now
Diffstat (limited to 'src/librc.c')
-rw-r--r-- | src/librc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librc.c b/src/librc.c index 3a3b53b0..0aecc4c7 100644 --- a/src/librc.c +++ b/src/librc.c @@ -591,15 +591,18 @@ bool rc_service_schedule_start (const char *service, } librc_hidden_def(rc_service_schedule_start) -void rc_service_schedule_clear (const char *service) +bool rc_service_schedule_clear (const char *service) { char *svc = rc_xstrdup (service); char *dir = rc_strcatpaths (RC_SVCDIR, "scheduled", basename (svc), (char *) NULL); + bool retval; free (svc); - rc_rm_dir (dir, true); + if (! (retval = rc_rm_dir (dir, true)) && errno == ENOENT) + retval = true; free (dir); + return (retval); } librc_hidden_def(rc_service_schedule_clear) |