Commit 8d015c91 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

in case symbolic link directories

parent 0a19af72
...@@ -584,13 +584,14 @@ class CsstMsDataManager: ...@@ -584,13 +584,14 @@ class CsstMsDataManager:
dfs_root = "/dfsroot" dfs_root = "/dfsroot"
# (clear and) make directories # (clear and) make directories
os.chdir(os.getenv("HOME")) # in case cwd is in dir_l0 or dir_l1
if os.path.exists(dir_l0): if os.path.exists(dir_l0):
os.system(f"rm -rf {dir_l0}") os.system(f"rm -rf {dir_l0}/*")
else:
os.mkdir(dir_l0)
if os.path.exists(dir_l1): if os.path.exists(dir_l1):
os.system(f"rm -rf {dir_l1}") os.system(f"rm -rf {dir_l1}/*")
os.mkdir(dir_l0) else:
os.mkdir(dir_l1) os.mkdir(dir_l1)
print("Making symbolic links ...") print("Making symbolic links ...")
for i_rec in range(len(tbl)): for i_rec in range(len(tbl)):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment