Commit d3558fdb authored by arkohut's avatar arkohut
Browse files

fix: tolerant no write permission for copy favicon to static dir

parent a8d80f93
...@@ -306,7 +306,10 @@ STATIC_DIR = Path(os.getenv("STATIC_DIR", BACKEND_DIR / "static")).resolve() ...@@ -306,7 +306,10 @@ STATIC_DIR = Path(os.getenv("STATIC_DIR", BACKEND_DIR / "static")).resolve()
frontend_favicon = FRONTEND_BUILD_DIR / "favicon.png" frontend_favicon = FRONTEND_BUILD_DIR / "favicon.png"
if frontend_favicon.exists(): if frontend_favicon.exists():
shutil.copyfile(frontend_favicon, STATIC_DIR / "favicon.png") try:
shutil.copyfile(frontend_favicon, STATIC_DIR / "favicon.png")
except PermissionError:
logging.error(f"No write permission to {STATIC_DIR / 'favicon.png'}")
else: else:
logging.warning(f"Frontend favicon not found at {frontend_favicon}") logging.warning(f"Frontend favicon not found at {frontend_favicon}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment