Check existence before remove symlink when deploying
This commit is contained in:
parent
340c788c7f
commit
8a22d1fa93
1
main.py
1
main.py
|
@ -118,6 +118,7 @@ class FileManager:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.logger.info("Recreating symlink point to {}".format(extract_dir))
|
self.logger.info("Recreating symlink point to {}".format(extract_dir))
|
||||||
|
if Path(self.symlink_path).exists():
|
||||||
os.remove(self.symlink_path)
|
os.remove(self.symlink_path)
|
||||||
os.symlink(extract_dir, self.symlink_path)
|
os.symlink(extract_dir, self.symlink_path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue