aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/org/pacien/tincapp/commands/TincApp.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/commands/TincApp.kt b/app/src/main/java/org/pacien/tincapp/commands/TincApp.kt
index 108b27d..b18a39b 100644
--- a/app/src/main/java/org/pacien/tincapp/commands/TincApp.kt
+++ b/app/src/main/java/org/pacien/tincapp/commands/TincApp.kt
@@ -14,7 +14,7 @@ object TincApp {
14 private val STATIC_SCRIPTS = listOf("tinc", "host", "subnet", "invitation").flatMap { s -> SCRIPT_SUFFIXES.map { s + it } } 14 private val STATIC_SCRIPTS = listOf("tinc", "host", "subnet", "invitation").flatMap { s -> SCRIPT_SUFFIXES.map { s + it } }
15 15
16 private fun listScripts(netName: String) = AppPaths.confDir(netName).listFiles { f -> f.name in STATIC_SCRIPTS } + 16 private fun listScripts(netName: String) = AppPaths.confDir(netName).listFiles { f -> f.name in STATIC_SCRIPTS } +
17 AppPaths.hostsDir(netName).listFiles { f -> SCRIPT_SUFFIXES.none { f.name.endsWith(it) } } 17 AppPaths.hostsDir(netName).listFiles { f -> SCRIPT_SUFFIXES.any { f.name.endsWith(it) } }
18 18
19 fun removeScripts(netName: String): CompletableFuture<Void> = runAsyncTask { 19 fun removeScripts(netName: String): CompletableFuture<Void> = runAsyncTask {
20 listScripts(netName).forEach { it.delete() } 20 listScripts(netName).forEach { it.delete() }