The following lines are creating multiple directories at the same level as the parent
|
if not os.path.exists(self.path + "jube_xml"): |
|
os.makedirs(self.path + "jube_xml") |
|
if not os.path.exists(self.path + "run_files"): |
|
os.makedirs(self.path + "run_files") |
|
if not os.path.exists(self.path + "ready_files"): |
|
os.makedirs(self.path + "ready_files") |
|
if not os.path.exists(self.path + "trajectories"): |
|
os.makedirs(self.path + "trajectories") |
|
if not os.path.exists(self.path + "results"): |
|
os.makedirs(self.path + "results") |
Paths should be generated using os.path.join(parent, child). For example,
xml_path = os.path.join(self.path, "jube_xml")
if not os.path.exists(xml_path):
os.makedirs(xml_path)
The real issue is presented further down in the source code. This seems to be the same as the initial setting
|
self.filename = self.path + "jube_xml/_jube_" + str(self.generation) + ".xml" |
but this is not (notice the leading forward slash after path)
|
f.write(" <do done_file=\"" + self.path + "/ready_files/ready_w_" + str( |
|
self.generation) + "\">$submit_cmd $job_file </do> <!-- shell command -->\n") |
The main issue is that, by manually generating the paths, we lose compatibility between OS-s and risk misplacing files.
The following lines are creating multiple directories at the same level as the parent
L2L/l2l/utils/JUBE_runner.py
Lines 56 to 65 in ef273cb
Paths should be generated using os.path.join(parent, child). For example,
The real issue is presented further down in the source code. This seems to be the same as the initial setting
L2L/l2l/utils/JUBE_runner.py
Line 76 in bb305d4
but this is not (notice the leading forward slash after path)
L2L/l2l/utils/JUBE_runner.py
Lines 130 to 131 in bb305d4
The main issue is that, by manually generating the paths, we lose compatibility between OS-s and risk misplacing files.