move code out of conditional block to make sure slave_output_directory gets initialized fixes #848

This commit is contained in:
Scott Fennell 2019-09-09 11:26:09 -05:00
parent 5dd8fe4cf1
commit d978cdf4c6

View File

@ -34,13 +34,13 @@ int Trick::MonteCarlo::construct_run_directory() {
return -1; return -1;
} }
run_directory = run_base_directory + "MONTE_" + run_directory; run_directory = run_base_directory + "MONTE_" + run_directory;
}
// If the user hasn't set an output directory for slaves, default to // If the user hasn't set an output directory for slaves, default to
// the same location as the master's output. // the same location as the master's output.
if (slave_output_directory.empty()) { if (slave_output_directory.empty()) {
slave_output_directory = run_directory; slave_output_directory = run_directory;
} }
}
if (access(run_directory.c_str(), F_OK) != 0) { if (access(run_directory.c_str(), F_OK) != 0) {
if (mkdir(run_directory.c_str(), 0775) != 0) { if (mkdir(run_directory.c_str(), 0775) != 0) {