@@ -83,8 +83,8 @@ def _callback(self, events):
83
83
for event in events :
84
84
if isinstance (event , MapEvent ):
85
85
current = self ._ycontent
86
- for path in event .path :
87
- current = current [path ]
86
+ for p in event .path :
87
+ current = current [p ]
88
88
for key , val in event .keys .items ():
89
89
action = val .get ("action" )
90
90
if action == "delete" :
@@ -101,6 +101,10 @@ def _callback(self, events):
101
101
self ._task_group .start_soon (self ._try_create_directory , path )
102
102
else :
103
103
self ._task_group .start_soon (self ._try_create_file , path )
104
+ elif action == "update" :
105
+ if val ["newValue" ] == "update" :
106
+ path = "/" .join (event .path [1 ::2 ])
107
+ self ._task_group .start_soon (self .ls , path )
104
108
105
109
@property
106
110
def version (self ) -> str :
@@ -152,7 +156,7 @@ async def _get_directory_content(self, path: Path) -> Map:
152
156
return Map (res )
153
157
154
158
async def _maybe_populate_dir (self , path : Path , content : Map ):
155
- if content ["content" ] is None :
159
+ if not isinstance ( content ["content" ], Map ) :
156
160
content ["content" ] = await self ._get_directory_content (path )
157
161
158
162
async def _get (self , path : Path | str | None = None ) -> Map :
0 commit comments