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

stat()/file_exists() always returns on non-existent files with AWS adapter #23

Open
tsmgeek opened this issue Nov 19, 2020 · 1 comment

Comments

@tsmgeek
Copy link

tsmgeek commented Nov 19, 2020

When using stat()/file_exists() methods when backend is AWS v3 adapter you always get either true or stat results that are all 0.

If backend is local then these issues do not happen.

@tsmgeek
Copy link
Author

tsmgeek commented Nov 19, 2020

https://github.com/twistor/flysystem-stream-wrapper/blob/master/src/Flysystem/Plugin/Stat.php#L117

Ok so I think the problem is twofold

  • if you get a literal FALSE back from getMetadata() it will normally mean it does not exist, the method itself does not throw exception
  • if you did a test for has() first you can check if it really exists before you do getMetadata()

The root stems from if you have 'disable_assert' enabled on the Filesystem.

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