Skip to content

Commit ece4048

Browse files
committed
withRoot function (doesn't work yet)
1 parent dfa2f01 commit ece4048

File tree

1 file changed

+8
-0
lines changed
  • app/src/main/java/de/lolhens/resticui/restic

1 file changed

+8
-0
lines changed

app/src/main/java/de/lolhens/resticui/restic/Restic.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ class Restic(
4444
private val loader = executable("loader")
4545
private val loader32 = executable("loader32")
4646

47+
private fun withRoot(args: List<String>): List<String> =
48+
listOf(
49+
"su",
50+
"-c",
51+
args.joinToString(" ") { arg -> "'" + arg.replace("'", "'\"'\"'") + "'" },
52+
"root"
53+
)
54+
4755
private fun withProot(
4856
binds: List<Pair<String, String>>,
4957
command: List<String>

0 commit comments

Comments
 (0)