diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java index 72dc3bf8..511f090c 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java @@ -187,6 +187,8 @@ public class FolderActivity extends SyncthingActivity Intent intent = new Intent(Intent.ACTION_EDIT); Uri uri = Uri.fromFile(ignoreFile); intent.setDataAndType(uri, "text/plain"); + intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); + startActivity(intent); } catch (IOException e) { Log.w(TAG, e); diff --git a/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java b/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java index 48aefc50..03ff67a1 100644 --- a/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java +++ b/src/main/java/com/nutomic/syncthingandroid/views/FoldersAdapter.java @@ -53,7 +53,7 @@ public class FoldersAdapter extends ArrayAdapter { binding.openFolder.setOnClickListener(v -> { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(folder.path)), "resource/folder"); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK); if (intent.resolveActivity(getContext().getPackageManager()) != null) { getContext().startActivity(intent); } else {