Spaces:
Runtime error
Runtime error
42hgyn26hz-cpu commited on
Commit ·
4ae8807
1
Parent(s): 534305b
Upload
Browse files- app/file_editor.py +3 -1
app/file_editor.py
CHANGED
|
@@ -5,7 +5,9 @@ import shutil
|
|
| 5 |
from datetime import datetime
|
| 6 |
from typing import Any, Dict, List
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
def _abs(relative_path: str) -> str:
|
|
|
|
| 5 |
from datetime import datetime
|
| 6 |
from typing import Any, Dict, List
|
| 7 |
|
| 8 |
+
_default_project_path = os.path.join("/tmp", "generated_project") if os.name != "nt" else os.path.join(os.getcwd(), "generated_project")
|
| 9 |
+
BASE_PROJECT_PATH = os.getenv("PROJECT_PATH", _default_project_path)
|
| 10 |
+
os.makedirs(BASE_PROJECT_PATH, exist_ok=True)
|
| 11 |
|
| 12 |
|
| 13 |
def _abs(relative_path: str) -> str:
|