Skip to content

Commit

Permalink
💡 Edit upload_from comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncopd committed Dec 30, 2024
1 parent 89530c0 commit 43bec2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lamindb_setup/core/upath.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def download_to(self, local_path: UPathStr, print_progress: bool = True, **kwarg

cloud_path_str = str(self)
local_path_str = str(local_path)

# otherwise fsspec calls fs._ls_real where it reads the body and parses links
# so the file is downloaded 2 times
# upath doesn't call fs.ls to infer type
Expand Down Expand Up @@ -325,8 +324,7 @@ def upload_from(
destination = self.as_posix()

# the below lines are to avoid s3fs triggering create_bucket in upload if
# dirs are present it allows to avoid permission error
# would be easier to just
# dirs are present, it allows to avoid permission error
if self.protocol == "s3" and local_path_is_dir and create_folder:
bucket = self.drive
if bucket not in self.fs.dircache:
Expand Down

0 comments on commit 43bec2a

Please sign in to comment.