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

in case symbolic link directories

parent 0a19af72
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -584,12 +584,13 @@ class CsstMsDataManager:
            dfs_root = "/dfsroot"

        # (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):
            os.system(f"rm -rf {dir_l0}")
        if os.path.exists(dir_l1):
            os.system(f"rm -rf {dir_l1}")
            os.system(f"rm -rf {dir_l0}/*")
        else:
            os.mkdir(dir_l0)
        if os.path.exists(dir_l1):
            os.system(f"rm -rf {dir_l1}/*")
        else:
            os.mkdir(dir_l1)

        print("Making symbolic links ...")