From 37b481f96906bc971b95bb2e9de9e67da0f54609 Mon Sep 17 00:00:00 2001 From: nift4 Date: Sun, 19 Jan 2025 14:53:59 +0100 Subject: [PATCH] fix inverted logic --- app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt b/app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt index 713be593..8f6c6c0d 100644 --- a/app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt +++ b/app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt @@ -42,14 +42,14 @@ object SDLessUtils { fun unmap(logic: DeviceLogic, name: String, force: Boolean, terminal: MutableList? = null): Boolean { val dmPath = File(logic.dmBase, name) if (SuFile.open(dmPath.toURI()).exists()) - return !Shell.cmd( + return Shell.cmd( "dmsetup remove " + (if (force) "-f " else "") + "--retry $name" ).let { if (terminal != null) it.to(terminal) else it - }.exec().isSuccess || SuFile.open(dmPath.toURI()).exists() + }.exec().isSuccess && !SuFile.open(dmPath.toURI()).exists() return true } } \ No newline at end of file