Skip to content

Commit 37b481f

Browse files
committed
fix inverted logic
1 parent 934a281 commit 37b481f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ object SDLessUtils {
4242
fun unmap(logic: DeviceLogic, name: String, force: Boolean, terminal: MutableList<String>? = null): Boolean {
4343
val dmPath = File(logic.dmBase, name)
4444
if (SuFile.open(dmPath.toURI()).exists())
45-
return !Shell.cmd(
45+
return Shell.cmd(
4646
"dmsetup remove " + (if (force) "-f " else "") +
4747
"--retry $name"
4848
).let {
4949
if (terminal != null)
5050
it.to(terminal)
5151
else it
52-
}.exec().isSuccess || SuFile.open(dmPath.toURI()).exists()
52+
}.exec().isSuccess && !SuFile.open(dmPath.toURI()).exists()
5353
return true
5454
}
5555
}

0 commit comments

Comments
 (0)