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

Bug: Can not support create Folder. #93

Open
akang943578 opened this issue Jul 6, 2024 · 0 comments
Open

Bug: Can not support create Folder. #93

akang943578 opened this issue Jul 6, 2024 · 0 comments

Comments

@akang943578
Copy link

I am using WinSCP to connect S3, which was created by Alist. When I try to create folder under a bucket, actually I got a file.
image

The logic for creating folder in WinSCP is as follows: a request with a path ending in a slash (/) indicates a folder creation, e.g., PUT /test-localhost/testFolder/. Conversely, for file creation, the request path does not end with a slash, e.g., PUT /test-localhost/testFolder/1.txt.

However, there is an issue with the implementation in gofakes3. It directly trims the path, which disregards the trailing slash, treating all requests as file creation.

You can see this in the source code: https://github.com/johannesboyne/gofakes3/blob/master/routing.go#L23

This trimming operation affects all S3 requests. While I can modify the PutObject function, I'm unsure if other S3 requests are also affected. It's quite confusing.

Related Issue: AlistGo/alist#6588

As you are the original owner of gofakes3 repository, can you give advise how to fix it? Is only PutObject affected, or all the S3 operations affected? Can you have time to investigate it and fix it, since you know the whole structure and can evaluate all the affections. Thanks.

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

No branches or pull requests

1 participant