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

Breaking change in 3.0.16 - did we abuse a bug with the mime detector for directories? Is there a reliable alternative? #1818

Open
redbullmarky opened this issue Sep 24, 2024 · 1 comment

Comments

@redbullmarky
Copy link

Question

Referring to this change, that formed 3.0.16:
dea7299

Prior to this change, if you passed a path that was a directory, you would indeed get a return of directory.
However, as the change explicitly checks that the item is a file (and not just that it exists), we can no longer use it.

Is there an alternative (ideally portable) way that can generally do the same thing here? Or would it be a valid request that the code in question could be modified to handle directory detection?

Cheers

Q A
Flysystem Version 3.0.16
Adapter Name Local
@frankdejonge
Copy link
Member

@redbullmarky 😅 I would indeed classify this at least as exploiting a very unintentional feature, it was not designed for this use-case. If I might ask, what are you trying to accomplish by detecting a directory through a mimeType call? Perhaps I can think of another way to reach your goal. PS: I'm on holiday right now, so my response times can be varying.

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

2 participants