-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
The following lines are creating multiple directories at the same level as the parent
Lines 56 to 65 in ef273cb
| 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
Line 76 in bb305d4
| self.filename = self.path + "jube_xml/_jube_" + str(self.generation) + ".xml" |
but this is not (notice the leading forward slash after path)
Lines 130 to 131 in bb305d4
| 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.
schmitts
Metadata
Metadata
Assignees
Labels
No labels