Fixed a few things that didn't work well

This commit is contained in:
Henry Corse
2022-12-12 20:47:49 -05:00
parent 17bb4b9997
commit d384b81d59
2 changed files with 5 additions and 8 deletions

3
rdify
View File

@ -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)