Browse Source

Fix use of chdir

rdb 11 years ago
parent
commit
95edd07b25
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/downloadertools/multify.cxx

+ 1 - 1
panda/src/downloadertools/multify.cxx

@@ -420,7 +420,7 @@ add_files(const vector_string &params) {
   }
   }
 
 
   // Change current working directory, if requested.
   // Change current working directory, if requested.
-  if (got_chdir_to && chdir(chdir_to.c_str()) != 0) {
+  if (got_chdir_to && !chdir_to.chdir()) {
     cout << "Failed to chdir to " << chdir_to << ": " << strerror(errno) << endl;
     cout << "Failed to chdir to " << chdir_to << ": " << strerror(errno) << endl;
     return false;
     return false;
   }
   }