From 3f67653fed8dc6412a538cf9dc82020ed3cd2f6f Mon Sep 17 00:00:00 2001 From: Miguel Ruivo Date: Tue, 16 Jul 2019 01:19:58 +0100 Subject: [PATCH] Fixes #104 (#109) --- CHANGELOG.md | 7 +++ README.md | 2 +- android/.idea/caches/build_file_checksums.ser | Bin 496 -> 0 bytes android/.idea/gradle.xml | 17 ------ android/.idea/misc.xml | 34 ------------ android/build.gradle | 2 +- .../flutter/plugin/filepicker/FileUtils.java | 2 +- example/pubspec.yaml | 50 +----------------- pubspec.yaml | 2 +- 9 files changed, 12 insertions(+), 104 deletions(-) delete mode 100644 android/.idea/caches/build_file_checksums.ser delete mode 100644 android/.idea/gradle.xml delete mode 100644 android/.idea/misc.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 95adeb9..1adefc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ +## 1.3.8 + +**Bug fix:** Fixes an issue that could cause a crash when picking files with very long names. + +**Changes:** Updates Android target API to 29. + ## 1.3.7 **Rollback - Breaking change:** Re-adds runtime verification for external storage read permission. Don't forget to add the permission to the `AndroidManifest.xml` file as well. More info in the README file. + **Bug fix:** Fixes a crash that could cause some Android API to crash when multiple files were selected from external storage. ## 1.3.6 diff --git a/README.md b/README.md index ff9835b..c902d08 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A package that allows you to use a native file explorer to pick single or multip First, add *file_picker* as a dependency in [your pubspec.yaml file](https://flutter.io/platform-plugins/). ``` -file_picker: ^1.3.7 +file_picker: ^1.3.8 ``` ### Android diff --git a/android/.idea/caches/build_file_checksums.ser b/android/.idea/caches/build_file_checksums.ser deleted file mode 100644 index 91ff37ce85ad1527db11bbdfa8b1dfe8f4876cb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 496 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}DUgg*;Xi%K$6i%W|bn4+E5d=~$~#u4&>iGcy+ zECzuqvOPEZ88)%JY~Y;n=7&=q(D}uwB_)}8>BUf^N(&k47}!8+McxEFbMH&Bx3;ot zWEU0CFJa(G0tFm~!rPOKJ93XM{kTEP`|;}en(QSE0y+7~i8-KPhdBpsYPHITTeB`U oeXVyDSeAanySIcv5YzE+)d#=t$bPha^{P!yL2G@3jZRen0I1=u!~g&Q diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml deleted file mode 100644 index 47bd81f..0000000 --- a/android/.idea/gradle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml deleted file mode 100644 index c0f68ed..0000000 --- a/android/.idea/misc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index c31b08b..5dab071 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,7 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 29 defaultConfig { minSdkVersion 16 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 e66185f..dc91416 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 @@ -199,7 +199,7 @@ public class FileUtils { } catch (Exception e) { try { fos.close(); - } catch(IOException ex) { + } catch(IOException | NullPointerException ex) { Log.e(TAG, "Failed to close file streams: " + e.getMessage(),null); return null; } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1719120..5cc47c5 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,20 +1,11 @@ name: file_picker_example description: An example of how to use the file_picker plugin. - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# Read more about versioning at semver.org. version: 1.0.0+1 dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 dev_dependencies: @@ -24,44 +15,5 @@ dev_dependencies: file_picker: path: ../ -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.io/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.io/custom-fonts/#from-packages + uses-material-design: true \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index f04baf4..5164872 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: file_picker description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extensions filtering support. author: Miguel Ruivo homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker -version: 1.3.7 +version: 1.3.8 dependencies: