Skip to content

Commit 7ff6cb9

Browse files
committed
prefer _stat() over DirEntry.stat() for windows support
1 parent 12e12b5 commit 7ff6cb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_server/services/contents/fileidmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _index_dir_recursively(self, dir_path, stat_info):
8787
with os.scandir(dir_path) as scan_iter:
8888
for entry in scan_iter:
8989
if entry.is_dir():
90-
self._index_dir_recursively(entry.path, self._parse_raw_stat(entry.stat()))
90+
self._index_dir_recursively(entry.path, self._stat(entry.path))
9191
scan_iter.close()
9292

9393
def _sync_all(self):
@@ -134,7 +134,7 @@ def _sync_dir(self, dir_path):
134134
"""
135135
with os.scandir(dir_path) as scan_iter:
136136
for entry in scan_iter:
137-
stat_info = self._parse_raw_stat(entry.stat())
137+
stat_info = self._stat(entry.path)
138138
id, is_dirty_dir = self._sync_file(entry.path, stat_info)
139139

140140
# if entry is unindexed directory, create new record

0 commit comments

Comments
 (0)