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

FTP backend Exists() checks if wrong entry is directory #185

Closed
funkyshu opened this issue May 28, 2024 · 0 comments
Closed

FTP backend Exists() checks if wrong entry is directory #185

funkyshu opened this issue May 28, 2024 · 0 comments
Assignees
Labels

Comments

@funkyshu
Copy link
Member

Describe the bug
Calling Exists sometimes attempts to create a directory that already exists because we're checking for entries[0] rather the the current entry at https://github.com/C2FO/vfs/blob/v6.14.0/backend/ftp/location.go#L160

To Reproduce
Create a file and subdirectory in some base dir, then call Exists on the subdirectory. If the file entry is returned first the entry type check will always be "file".

Expected behavior
Exists should properly check for the entry type of the current entry.

@funkyshu funkyshu self-assigned this May 28, 2024
@funkyshu funkyshu added the bug label May 28, 2024
funkyshu added a commit that referenced this issue May 28, 2024
…tory but it was was only checking the first entry.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant