Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ class FileHandler(FileSystemEventHandler):
|
|
53 |
print(f'File {event.src_path} has been deleted.')
|
54 |
new_event = {
|
55 |
"type": "file-delete",
|
56 |
-
|
57 |
"path": event.src_path,
|
58 |
}
|
59 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
@@ -66,7 +66,9 @@ class FileHandler(FileSystemEventHandler):
|
|
66 |
"type": "file-rename",
|
67 |
|
68 |
"OldPath": event.src_path,
|
|
|
69 |
"NewPath": event.dest_path,
|
|
|
70 |
}
|
71 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
72 |
|
|
|
53 |
print(f'File {event.src_path} has been deleted.')
|
54 |
new_event = {
|
55 |
"type": "file-delete",
|
56 |
+
"name": event.src_path.split('/')[-1],
|
57 |
"path": event.src_path,
|
58 |
}
|
59 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
|
|
66 |
"type": "file-rename",
|
67 |
|
68 |
"OldPath": event.src_path,
|
69 |
+
"oldname": event.src_path.split('/')[-1],
|
70 |
"NewPath": event.dest_path,
|
71 |
+
"newname": event.dest_path.split('/')[-1],
|
72 |
}
|
73 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
74 |
|