diff --git a/CHANGELOG.md b/CHANGELOG.md index 757686a..09e5dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.3+2 +* Fixes a crash on Android when a file has an id that can't be resolved and uses a name instead (#221); +* Minor fix on Go (Desktop) - Windows (thanks @marchellodev); + ## 1.6.3+1 Addresses an issue with plugin calls on Go (Desktop) - Linux & Windows diff --git a/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java index c7d2f33..fd22cec 100644 --- a/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java +++ b/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java @@ -71,14 +71,15 @@ public class FileUtils { id = id.split(":")[1]; } for (final String contentUriPrefix : contentUriPrefixesToTry) { - final Uri contentUri = ContentUris.withAppendedId(Uri.parse(contentUriPrefix), Long.valueOf(id)); try { + final Uri contentUri = ContentUris.withAppendedId(Uri.parse(contentUriPrefix), Long.valueOf(id)); final String path = getDataColumn(context, contentUri, null, null); if (path != null) { return path; } } catch (final Exception e) { Log.e(TAG, "Something went wrong while retrieving document path: " + e.toString()); + return null; } } diff --git a/go/README.md b/go/README.md index 2c2a25b..b6bc6b5 100644 --- a/go/README.md +++ b/go/README.md @@ -1,6 +1,6 @@ # file_picker -This Go package implements the host-side of the Flutter [file_picker](https://github.com/miguelpruivo/plugins_flutter_file_picker) plugin. +This Go package implements the host-side of the Flutter [file_picker](https://github.com/miguelpruivo/flutter_file_picker) plugin. ## Usage @@ -11,8 +11,7 @@ package main import ( ... other imports .... - - file_picker "github.com/miguelpruivo/plugins_flutter_file_picker/go" + file_picker "github.com/miguelpruivo/flutter_file_picker/go" ) var options = []flutter.Option{ diff --git a/go/file_windows.go b/go/file_windows.go index 6ab4c31..97d4118 100644 --- a/go/file_windows.go +++ b/go/file_windows.go @@ -1,8 +1,6 @@ package file_picker import ( - "strings" - "github.com/gen2brain/dlgs" "github.com/pkg/errors" ) @@ -21,9 +19,9 @@ func fileFilter(method string, extensions []string, size int, isMulti bool) (str var i int var filters = "Files (" for i = 0 ; i=2.0.0-dev.28.0 <3.0.0" + sdk: ">=2.0.0 <3.0.0" flutter: ">=1.10.0 <2.0.0" flutter: