diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java index 3e3b478c7..1c3fbe597 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -255,7 +255,7 @@ public class MainActivity extends SimpleActivity private void deleteItem(File file) { if (Utils.Companion.needsStupidWritePermissions(this, file.getAbsolutePath())) { - if (!Utils.Companion.isShowingWritePermissions(this, new File(file.getAbsolutePath()))) { + if (!Utils.Companion.isShowingWritePermissions(this, file)) { final DocumentFile document = Utils.Companion.getFileDocument(this, file.getAbsolutePath()); document.delete(); }