diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt index d95913ed..87fdc236 100644 --- a/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/LogViewerActivity.kt @@ -346,7 +346,10 @@ class LogViewerActivity : AppCompatActivity() { if (mode != "r") return null val log = logForUri(uri) ?: return null return openPipeHelper(uri, "text/plain", null, log) { output, _, _, _, l -> - FileOutputStream(output.fileDescriptor).write(l!!) + try { + FileOutputStream(output.fileDescriptor).write(l!!) + } catch (_: Exception) { + } } } } |