From 8903a96116b4a2736de56a93d85a76a77898ffdd Mon Sep 17 00:00:00 2001 From: Jona Date: Thu, 14 Jul 2022 22:20:24 +0200 Subject: [PATCH 1/6] (#61) close file OutputStream after file is created --- .../sharedstorage/storageaccessframework/DocumentFileApi.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework/DocumentFileApi.kt b/android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework/DocumentFileApi.kt index af90e89..c70710c 100644 --- a/android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework/DocumentFileApi.kt +++ b/android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework/DocumentFileApi.kt @@ -303,6 +303,7 @@ internal class DocumentFileApi(private val plugin: SharedStoragePlugin) : plugin.context.contentResolver.openOutputStream(this)?.apply { write(content) flush() + close() val createdFileDocument = documentFromUri(plugin.context, createdFile.uri) From 5a13a89ac6b6c8c6228054414c5d9a8342b0c105 Mon Sep 17 00:00:00 2001 From: lakscastro Date: Fri, 15 Jul 2022 10:35:29 -0300 Subject: [PATCH 2/6] (#86) Log `CHANGELOG.md` closes `OutputStream` --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dbd4e7..bed20b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,22 @@ +## 0.4.2 + +Minimal hotfix: + +- Closes the `OutputStream` when creating a file [#61](https://github.com/lakscastro/shared-storage/issues/61), [#86](https://github.com/lakscastro/shared-storage/pull/86) (@jfaltis). + +## 0.4.1 + +Minimal hotfix of the example project: + +- Fix build error of the example project. Reported at [#70](https://github.com/lakscastro/shared-storage/issues/70) and fixed by [#72](https://github.com/lakscastro/shared-storage/pull/72) (@jfaltis). + ## 0.4.0 Fix the current behavior of `listFiles` and `openDocumentFile` API. ### Improvements -- It's now possible to list contents of all subfolders of a granted Uri opened from `openDocumentTree` ([@EternityForest](https://github.com/EternityForest)). +- It's now possible to list contents of all subfolders of a granted Uri opened from `openDocumentTree` (@EternityForest). - Now `ACTION_VIEW` intent builder through `openDocumentFile` API was fixed. So it's now possible to open any file of any kind in third party apps without needing specify the mime type. ### Breaking changes From bef45b25d16b72b9f1e57ac85e08083babc09aee Mon Sep 17 00:00:00 2001 From: lakscastro Date: Fri, 15 Jul 2022 10:37:57 -0300 Subject: [PATCH 3/6] (#86) Set plugin version to `v0.4.2` --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 5f4f0de..49b10ba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: shared_storage description: "Flutter plugin to work with external storage." -version: 0.4.1 +version: 0.4.2 homepage: https://github.com/lakscastro/shared-storage repository: https://github.com/lakscastro/shared-storage issue_tracker: https://github.com/lakscastro/shared-storage/issues From 1006fad2a2fd53951f15e461049d99530a1640bc Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 13:41:42 +0000 Subject: [PATCH 4/6] docs: update README.md [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48581e4..9511917 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ These are the brilliant minds behind the development of this plugin!
dangilbert

💻 🐛
dhaval-k-simformsolutions

🐛 🤔
Daniel Dunn

🐛 💻 📖 -
jfaltis

🐛 +
jfaltis

🐛 💻 📖 From e4d2987376bf9f328c93576955fc0f031eb7634b Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 13:41:43 +0000 Subject: [PATCH 5/6] docs: update docs/index.md [skip ci] --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 282b59d..8e7c3a0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -80,7 +80,7 @@ These are the brilliant minds behind the development of this plugin!
dangilbert

💻 🐛
dhaval-k-simformsolutions

🐛 🤔
Daniel Dunn

🐛 💻 📖 -
jfaltis

💬 🐛 +
jfaltis

🐛 💻 📖 From d2084e26cab607bf5bb3f6c8036b436566542219 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Fri, 15 Jul 2022 13:41:44 +0000 Subject: [PATCH 6/6] docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index dd0908f..64d7e58 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -76,7 +76,9 @@ "avatar_url": "https://avatars.githubusercontent.com/u/45465572?v=4", "profile": "http://jfaltis.de", "contributions": [ - "bug" + "bug", + "code", + "doc" ] } ],