mirror of
https://github.com/JonasunderscoreJones/selfhosted-overleaf-project-share.git
synced 2025-10-25 09:59:19 +02:00
fix symlink project updates
This commit is contained in:
parent
86e76c2d98
commit
6969c7d77c
1 changed files with 2 additions and 2 deletions
4
serve.py
4
serve.py
|
|
@ -15,8 +15,8 @@ STATIC_SHARE_RESTRICTION = True # Toggle restriction on/off
|
|||
def create_symlink_to_dir(symlink_target, link_path):
|
||||
try:
|
||||
if os.path.islink(link_path) or os.path.exists(link_path):
|
||||
print(f"Path '{link_path}' already exists.")
|
||||
return
|
||||
os.remove(link_path)
|
||||
# Ensure the parent directory exists
|
||||
os.makedirs(os.path.dirname(link_path), exist_ok=True)
|
||||
os.symlink(symlink_target, link_path)
|
||||
print(f"Symlink created: {link_path} -> {symlink_target}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue