Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisaCG committed Nov 25, 2024
1 parent 38b9d57 commit 50f3a12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupyter_drives/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def get_contents(self, drive_name, path):
# stream will be an async iterable of RecordBatch
stream = obs.list(self._content_managers[drive_name], path, chunk_size=100, return_arrow=True)
async for batch in stream:
# check once if we are dealing with a directory
# if content exists we are dealing with a directory
if isDir is False and batch:
isDir = True
emptyDir = False
Expand All @@ -194,6 +194,7 @@ async def get_contents(self, drive_name, path):
obj = await obs.get_async(self._content_managers[drive_name], path)
stream = obj.stream(min_chunk_size=5 * 1024 * 1024) # 5MB sized chunks
async for buf in stream:
# if content exists we are dealing with a file
if emptyDir is True and buf:
emptyDir = False
content += buf
Expand Down

0 comments on commit 50f3a12

Please sign in to comment.