瀏覽代碼

Merge pull request #2952 from arkohut/tolerant-readonly-filesystem

fix: tolerant readonly filesystem for copy favicon to static dir
Timothy Jaeryang Baek 11 月之前
父節點
當前提交
fcf8f2a704
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      backend/config.py

+ 3 - 2
backend/config.py

@@ -308,8 +308,9 @@ frontend_favicon = FRONTEND_BUILD_DIR / "favicon.png"
 if frontend_favicon.exists():
 if frontend_favicon.exists():
     try:
     try:
         shutil.copyfile(frontend_favicon, STATIC_DIR / "favicon.png")
         shutil.copyfile(frontend_favicon, STATIC_DIR / "favicon.png")
-    except PermissionError:
-        logging.error(f"No write permission to {STATIC_DIR / 'favicon.png'}")
+    except Exception as e:
+        logging.error(f"An error occurred: {e}")
+
 else:
 else:
     logging.warning(f"Frontend favicon not found at {frontend_favicon}")
     logging.warning(f"Frontend favicon not found at {frontend_favicon}")