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 S3 API multipart upload on Windows #4666

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

hencoappel
Copy link
Contributor

The file paths were being having '/' changed to '' by filepath.Dir() resulting in a file being created with '' separators, but when trying to read the files, the same wasn't happening.

What problem are we solving?

Failure to retrieve objects via S3 API in Windows

How are we solving the problem?

Running filepaths.ToSlash() on the result of filepath.Dir().

How is the PR tested?

Ran it and I could now retrieve objects that were created in nested dirs, e.g. /some/nested/file.txt

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

The file paths were being having '/' changed to '\' by filepath.Dir()
resulting in a file being created with '\' separators, but when trying
to read the files, the same wasn't happening.
@chrislusf
Copy link
Collaborator

Thanks!

@chrislusf chrislusf merged commit 89542db into seaweedfs:master Jul 11, 2023
4 checks passed
@hencoappel hencoappel deleted the win-s3api-fix branch July 12, 2023 07:26
kmlebedev pushed a commit to kmlebedev/seaweedfs that referenced this pull request Dec 22, 2023
The file paths were being having '/' changed to '\' by filepath.Dir()
resulting in a file being created with '\' separators, but when trying
to read the files, the same wasn't happening.

Co-authored-by: Hendrik Appel <happel@europe.altair.com>
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.

None yet

2 participants