Skip to content

Commit

Permalink
Merge pull request #5151 from pierrec/issue3353
Browse files Browse the repository at this point in the history
internal/driver/mobile: return storage.ErrNotExists instead of custom error
  • Loading branch information
Jacalz authored Sep 25, 2024
2 parents 4ee979f + 6196b03 commit 1ea14f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/driver/mobile/file_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"fyne.io/fyne/v2"
"fyne.io/fyne/v2/internal/driver/mobile/app"
"fyne.io/fyne/v2/storage"
"fyne.io/fyne/v2/storage/repository"
)

Expand Down Expand Up @@ -90,7 +91,7 @@ func nativeFileOpen(f *fileOpen) (io.ReadCloser, error) {

ret := openStream(f.uri.String())
if ret == nil {
return nil, errors.New("resource not found at URI")
return nil, storage.ErrNotExists
}

stream := &javaStream{}
Expand Down Expand Up @@ -122,7 +123,7 @@ func nativeFileSave(f *fileSave) (io.WriteCloser, error) {

ret := saveStream(f.uri.String())
if ret == nil {
return nil, errors.New("resource not found at URI")
return nil, storage.ErrNotExists
}

stream := &javaStream{}
Expand Down

0 comments on commit 1ea14f7

Please sign in to comment.