diff --git a/main.py b/main.py index 11f4a25..6560f4e 100755 --- a/main.py +++ b/main.py @@ -118,7 +118,8 @@ class FileManager: return False self.logger.info("Recreating symlink point to {}".format(extract_dir)) - os.remove(self.symlink_path) + if Path(self.symlink_path).exists(): + os.remove(self.symlink_path) os.symlink(extract_dir, self.symlink_path) return True