From 212ede449b498e4c5582b438e30c9f2833106f9a Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Dec 2019 23:37:52 +0100 Subject: [PATCH] properly handle SAF dialog in case the source of a copy/move is on sd --- .../simplemobiletools/gallery/pro/extensions/Activity.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index bd2788697..c2f273e6c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -209,7 +209,12 @@ fun BaseSimpleActivity.tryCopyMoveFilesTo(fileDirItems: ArrayList, val source = fileDirItems[0].getParentPath() PickDirectoryDialog(this, source, true) { - copyMoveFilesTo(fileDirItems, source.trimEnd('/'), it, isCopyOperation, true, config.shouldShowHidden, callback) + val destination = it + handleSAFDialog(source) { + if (it) { + copyMoveFilesTo(fileDirItems, source.trimEnd('/'), destination, isCopyOperation, true, config.shouldShowHidden, callback) + } + } } }