Closed brucealthompson closed 1 month ago
Thanks for the careful analysis - I agree with the proposed fix. Would you like to place that into a PR so it gets associated with your account? :). (plus Hacktoberfest credits!)
Would you like to place that into a PR so it gets associated with your account? :). (plus Hacktoberfest credits!)
PR == Merge Request?? Can you point me to documentation for your development process? I assume you want me to check into a branch off of main on Github. Is there any naming convention you use?
PR = Pull Request, you would fork the repo, make a branch from develop
with whatever name you want, then push it to your fork. Go to GitHub and open a pull request for us to look at the change.
That said if it's a tiny change you might get away with the GitHub "edit file" feature which automates a lot of that for you.
Created the pull request: https://github.com/fyne-io/fyne/pull/5213
Thanks so much for the fix :)
Checklist
Describe the bug
Register a new repository with a new scheme. I used the scheme "httpfile". Then set the folder location for dialog.NewFolderOpen() with the following code:
The resulting file dialog uses the default directory (without returning an error) instead of the URI in listableURI. func (f *FileDialog) effectiveStartingDir() fyne.ListableURI in fyne.io\fyne\v2@v2.5.2\dialog\file.go has incorrect logic at the beginning.
I have already found the code causing this issue and fixed it. Here is the code causing this issue in: fyne.io\fyne\v2@v2.5.2\dialog\file.go
Here is the fix:
Add return f.startingLocation to the end of the above code segment.
How to reproduce
Register a new repository with a new scheme. I used the scheme "httpfile". Then set the folder location for dialog.NewFolderOpen() with the following code:
The resulting file dialog uses the default directory (without returning an error) instead of the URI in listableURI. func (f *FileDialog) effectiveStartingDir() fyne.ListableURI in fyne.io\fyne\v2@v2.5.2\dialog\file.go has incorrect logic at the beginning.
Screenshots
No response
Example code
Fyne version
2.5.2
Go compiler version
1.23.1
Operating system and version
Windows 11
Additional Information
I have already implemented the fix in my copy of fyne. See above for the fix. Works fyne now.