Procházet zdrojové kódy

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

Davin McCall před 5 roky
rodič
revize
3e26a28ffb
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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;
     string service_file_path;
 
 
     for (std::string path : paths) {
     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);
         service_file.open(test_path.c_str(), ios::in);
         if (service_file) {
         if (service_file) {