Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
800f93d
1
Parent(s): e91119b
fix: prevent race condition on static dir creation
Browse files
main.py
CHANGED
|
@@ -217,7 +217,7 @@ FRONTEND_INTERNAL_PATH = os.path.join(BASE_DIR, "frontend/apps/internal/dist")
|
|
| 217 |
# Ensure static directory exists to prevent mount errors
|
| 218 |
STATIC_PATH = os.path.join(BASE_DIR, "static")
|
| 219 |
if not os.path.exists(STATIC_PATH):
|
| 220 |
-
os.makedirs(STATIC_PATH)
|
| 221 |
|
| 222 |
# Initialize Templates for the Landing Page
|
| 223 |
templates = Jinja2Templates(directory=os.path.join(BASE_DIR, "templates"))
|
|
|
|
| 217 |
# Ensure static directory exists to prevent mount errors
|
| 218 |
STATIC_PATH = os.path.join(BASE_DIR, "static")
|
| 219 |
if not os.path.exists(STATIC_PATH):
|
| 220 |
+
os.makedirs(STATIC_PATH, exist_ok=True)
|
| 221 |
|
| 222 |
# Initialize Templates for the Landing Page
|
| 223 |
templates = Jinja2Templates(directory=os.path.join(BASE_DIR, "templates"))
|