Skip to content

Commit 8d1e483

Browse files
joeyutongvidartf
authored andcommitted
Avoid redundant call to _get_os_path in _dir_model
1 parent 5558318 commit 8d1e483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_server/services/contents/filemanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def _dir_model(self, path, content=True):
295295
model["size"] = None
296296
if content:
297297
model["content"] = contents = []
298-
os_dir = self._get_os_path(path)
298+
os_dir = os_path
299299
for name in os.listdir(os_dir):
300300
try:
301301
os_path = os.path.join(os_dir, name)
@@ -767,7 +767,7 @@ async def _dir_model(self, path, content=True):
767767
model["size"] = None
768768
if content:
769769
model["content"] = contents = []
770-
os_dir = self._get_os_path(path)
770+
os_dir = os_path
771771
dir_contents = await run_sync(os.listdir, os_dir)
772772
for name in dir_contents:
773773
try:

0 commit comments

Comments
 (0)