Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use unique key for S3Files for folder copy progress #19

Merged

Conversation

billowsofcode
Copy link
Contributor

When copying a folder from S3 to local, in copy(from s3Folder: S3Folder, to folder: String...) FolderUploadProgress's init was using S3File.name to calculate total size of all the files. S3File.name will not be unique if there are two or more files with the same filename in different subfolders. For example if you tried to download this folder from S3 it would assert assert(folderProgress.finished == true):

file.txt
subfolder/file.txt

…older from S3

When copying or syncing a folder from S3 to local, it was using S3File.name to calculate total size for progress.  S3File.name will not be unique if there are two or more files with the same filename in different subfolders.
Copy link
Member

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adam-fowler adam-fowler merged commit 491b52f into soto-project:main Mar 6, 2022
@adam-fowler
Copy link
Member

In release 0.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants