From 6969c7d77c4f4827c9cab04e09aa5dd905342352 Mon Sep 17 00:00:00 2001 From: Jonas_Jones Date: Mon, 9 Jun 2025 01:59:53 +0200 Subject: [PATCH] fix symlink project updates --- serve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serve.py b/serve.py index b934846..d9bee02 100644 --- a/serve.py +++ b/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}")