From 41b34d90564f5db2adac1cdd2f1cee6d3752bc79 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 23 Feb 2018 16:02:25 +0100 Subject: [PATCH] delete the temporary file after rotating, not the new one --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 2abb43dee..646f734ec 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -569,7 +569,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } catch (e: Exception) { showErrorToast(e) } finally { - deleteFile(FileDirItem(newPath, newPath.getFilenameFromPath())) + deleteFile(FileDirItem(tmpFile.absolutePath, tmpFile.absolutePath.getFilenameFromPath())) } }