diff options
author | Gerrit Pape <pape@smarden.org> | 2008-04-20 20:38:57 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2008-04-20 20:38:57 +0000 |
commit | ed673f8f525aead9418d34faea94b83c71b4eaa7 (patch) | |
tree | ce3dd102dc86c70d1b28b6563386c6b3e3aa32c6 /src/sv.c | |
parent | 1e83f029d97222fdbda1a26a920199528e72e72d (diff) | |
download | runit-ed673f8f525aead9418d34faea94b83c71b4eaa7.tar.gz runit-ed673f8f525aead9418d34faea94b83c71b4eaa7.tar.xz runit-ed673f8f525aead9418d34faea94b83c71b4eaa7.zip |
sv.c: service name is also relative to the current directory if it ends with a slash.
Diffstat (limited to 'src/sv.c')
-rw-r--r-- | src/sv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sv.c b/src/sv.c index 855ae39..0559abe 100644 --- a/src/sv.c +++ b/src/sv.c @@ -331,7 +331,8 @@ int main(int argc, char **argv) { servicex =service; for (i =0; i < services; ++i) { - if ((**service != '/') && (**service != '.')) { + if ((**service != '/') && (**service != '.') && **service && + ((*service)[str_len(*service) -1] != '/')) { if ((chdir(varservice) == -1) || (chdir(*service) == -1)) { fail("unable to change to service directory"); *service =0; |