Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ async def create_file_structure(websocket, data, base_path='.'):
|
|
21 |
folder_path = os.path.join(base_path, data['name'])
|
22 |
os.makedirs(folder_path, exist_ok=True)
|
23 |
for child in data['children']:
|
24 |
-
create_file_structure(websocket,child, base_path=folder_path)
|
25 |
elif data['type'] == 'file':
|
26 |
file_path = os.path.join(base_path, data['name'])
|
27 |
with open(file_path, 'w', encoding='utf-8') as file:
|
|
|
21 |
folder_path = os.path.join(base_path, data['name'])
|
22 |
os.makedirs(folder_path, exist_ok=True)
|
23 |
for child in data['children']:
|
24 |
+
await create_file_structure(websocket,child, base_path=folder_path)
|
25 |
elif data['type'] == 'file':
|
26 |
file_path = os.path.join(base_path, data['name'])
|
27 |
with open(file_path, 'w', encoding='utf-8') as file:
|