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