Skip to content

Commit

Permalink
fix inverted logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Jan 19, 2025
1 parent 934a281 commit 37b481f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/andbootmgr/app/util/SDLessUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ object SDLessUtils {
fun unmap(logic: DeviceLogic, name: String, force: Boolean, terminal: MutableList<String>? = 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
}
}

0 comments on commit 37b481f

Please sign in to comment.