From 9856635d8b07c1ecac01533b077bd07d5d5a3e56 Mon Sep 17 00:00:00 2001 From: Bruce Thompson Date: Fri, 18 Oct 2024 19:31:59 -0600 Subject: [PATCH] Fix for https://github.com/fyne-io/fyne/issues/5207 --- dialog/file.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dialog/file.go b/dialog/file.go index b0441067c5..69269efb73 100644 --- a/dialog/file.go +++ b/dialog/file.go @@ -474,8 +474,11 @@ func (f *fileDialog) setLocation(dir fyne.URI) error { d = buildDir buildDir = d + string(os.PathSeparator) } - - newDir := storage.NewFileURI(buildDir) + newURL := dir.Scheme() + "://" + filepath.ToSlash(buildDir) + newDir, err := storage.ParseURI(newURL) + if err != nil { + return err + } isDir, err := storage.CanList(newDir) if err != nil { return err