Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -121,8 +121,8 @@ async def get_file_content(websocket, key,project_name, path,rpath,name,connecte
|
|
121 |
|
122 |
|
123 |
|
124 |
-
async def create_file(websocket, key,project_name, path,name,root,targetElement, connected):
|
125 |
-
file_path = os.path.join(os.getcwd(), 'projects', key,project_name,
|
126 |
# Create the file
|
127 |
with open(file_path, 'w'):
|
128 |
pass
|
@@ -339,7 +339,7 @@ async def exe(websocket,connected,key):
|
|
339 |
if event["item"]=="folder":
|
340 |
await create_folder(websocket, key,event["project_name"], event["path"],event["name"], connected)
|
341 |
else:
|
342 |
-
await create_file(websocket, key,event["project_name"], event["path"],event["name"],event['root'],event['targetElement'], connected)
|
343 |
|
344 |
|
345 |
elif event["command"]["type"]=="delete":
|
|
|
121 |
|
122 |
|
123 |
|
124 |
+
async def create_file(websocket, key,project_name, path,name,root,targetElement,rpath connected):
|
125 |
+
file_path = os.path.join(os.getcwd(), 'projects', key,project_name, rpath,name)
|
126 |
# Create the file
|
127 |
with open(file_path, 'w'):
|
128 |
pass
|
|
|
339 |
if event["item"]=="folder":
|
340 |
await create_folder(websocket, key,event["project_name"], event["path"],event["name"], connected)
|
341 |
else:
|
342 |
+
await create_file(websocket, key,event["project_name"], event["path"],event["name"],event['root'],event['targetElement'],event["rpath"], connected)
|
343 |
|
344 |
|
345 |
elif event["command"]["type"]=="delete":
|