Browse Source

dinitctl: handle service dir with absolute path in enable/disable.

Davin McCall 5 years ago
parent
commit
3e26a28ffb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/dinitctl.cc

+ 1 - 1
src/dinitctl.cc

@@ -925,7 +925,7 @@ static int enable_disable_service(int socknum, cpbuffer_t &rbuffer, const char *
     string service_file_path;
 
     for (std::string path : paths) {
-        string test_path = combine_paths(dinit_cwd + '/' + path, from);
+        string test_path = combine_paths(combine_paths(dinit_cwd, path.c_str()), from);
 
         service_file.open(test_path.c_str(), ios::in);
         if (service_file) {