Fixed a few things that didn't work well
This commit is contained in:
1 parent
17bb4b9997
commit
d384b81d59
2 files changed
+5
-8
No files matched your search
@@ -26,11 +26,10 @@ class RamDiskItem():
|
||||
self.persist.mkdir(parents=True, exist_ok=True)
|
||||
self.ramdisk.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
if self.target.is_file():
|
||||
shutil.copy2(self.target, self.ramdisk)
|
||||
else:
|
||||
shutil.copytree(self.target, self.full_rd_path)
|
||||
shutil.copytree(self.target, self.full_rd_path, dirs_exist_ok=True)
|
||||
shutil.move(self.target, self.persist)
|
||||
|
||||
os.symlink(self.full_rd_path, self.target)
|
||||
|
||||
Reference in new issue
Block a user