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

fix: tolerant readonly filesystem for copy favicon to static dir
This commit is contained in:
Timothy Jaeryang Baek 2024-06-10 11:59:06 -07:00 committed by GitHub
commit fcf8f2a704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: except Exception as e:
logging.error(f"No write permission to {STATIC_DIR / 'favicon.png'}") 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}")