-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
dialog.New(File/Folder/...)Open() only works with "file" repository #5204
Comments
I have produced a fix for this issue on https://github.com/brucealthompson/fyne/blob/release/v2.5.x/dialog/file.go |
Hmm, is it right that setting the starting location to non-file should remove the favourites? That is not how things like Windows file explorer or a macOS finder window work. If we have to hide them because they are not supported on wasm then let's make that change instead. |
Definitely its not the right fix from a fyne point of view. You will want something more general. That's why I did not do a push request.
I think it could be supported on wasm using a webdav repository. Unfortunately the correct fix is much more involved than what I did to get my application to work. I was thinking that there must be someone that maintains the dialog.NewFileOpen() code that could do the correct fix. Is that not the case? |
Apologies I maybe misunderstood your earlier message "It works for me and I believe in general."
All of the repository is maintained by a team - none of the code is maintained by a specific person. Things may have been confused because the PRs/issues got overlapped. |
Checklist
Describe the bug
I have written a new repository interface which is intended to allow dialog.New(File/Folder/...)Open() to work with remote filesystems in a similar manner as WebDav. I have found that the current implementation of dialog.New(File/Folder/...)Open() has
a number of ties to the operating system / filesystem that fyne is running on. This works fine when it is displaying content from the "file" repository. However, it pretty much breaks down when you try to use it with a different repository. Here is an example of code that looks like it is currently broken for anything other than the "file" repository:
fyne.io\fyne\[email protected]\dialog\file.go
getFavoriteLocations() is platform (not repository) specific code.
Here is another snippet from the same file:
isHidden() is platform (not repository) specific code.
I suspect that the file/folder dialog objects are going to need some pretty major work to get them to work with repositories other than "file".
How to reproduce
This is bug is not possible to reproduce with the current codebase as a new non "file" repository needs to be written to exercise the code. I have written a new repository called "httpfile" which supports a subset of webdav functionality.
Screenshots
No response
Example code
I would provide the package "httpfile" I have written but it looks like attaching go files is not supported.
Fyne version
2.5.2
Go compiler version
1.23.1
Operating system and version
Windows 11
Additional Information
No response
The text was updated successfully, but these errors were encountered: