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: restore rootLocation on LocalFilesystemAdapter #1611

Closed
paul-thebaud opened this issue Dec 13, 2022 · 2 comments
Closed

fix: restore rootLocation on LocalFilesystemAdapter #1611

paul-thebaud opened this issue Dec 13, 2022 · 2 comments

Comments

@paul-thebaud
Copy link

paul-thebaud commented Dec 13, 2022

Bug Report

Q A
Flysystem Version 3.11.0
Adapter Name Local
Adapter version ?

Summary

With the #1582 PR, the rootLocation property of local adapter was removed and replaced by $this->prefixer->prefixPath('/') to get the root path inside ensureRootDirectoryExists . This is bad, because when using a "fake" / root on Windows (to get access to all disks with a unique filesystem instance), the prefixPath method will return an empty string.

Proposition

I think you should restore the rootLocation property on the class and use it inside the ensureRootDirectoryExists method.

How to reproduce

Configure a local adapter on windows with a / root path. Ensure root directory exists will crash.

@frankdejonge
Copy link
Member

It was restored. Release coming soon.

@paul-thebaud
Copy link
Author

Thanks a lot @frankdejonge!

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