changeset 530:693ba2314798

add debug code around deleting the connections file
author Carl Byington <carl@five-ten-sg.com>
date Tue, 31 Dec 2024 13:50:47 -0700
parents 5e230fbada9e
children 304a8d5ad1e6
files app/src/main/AndroidManifest.xml app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/src/main/AndroidManifest.xml	Tue Dec 31 12:25:21 2024 -0700
+++ b/app/src/main/AndroidManifest.xml	Tue Dec 31 13:50:47 2024 -0700
@@ -17,8 +17,8 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.five_ten_sg.connectbot"
-    android:versionName="1.9.4-9"
-    android:versionCode="1949"
+    android:versionName="1.9.5-0"
+    android:versionCode="1950"
     android:installLocation="auto">
     <queries>
         <package android:name="com.five_ten_sg.connectbot.monitor" />
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Tue Dec 31 12:25:21 2024 -0700
+++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Tue Dec 31 13:50:47 2024 -0700
@@ -28,6 +28,7 @@
 import java.io.BufferedReader;
 import java.io.FileReader;
 import java.io.File;
+import java.nio.file.Files;
 import java.util.HashMap;
 import java.util.List;
 
@@ -620,11 +621,13 @@
             }
 
             reader.close();
+            hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg);
+
             if (del) {
                 Log.d(TAG, "try to delete " + fn);
-                (new File(fn)).delete();
+                Files.delete(fn);
+                Log.d(TAG, "deleted " + fn);
             }
-            hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg);
         }
         catch (Exception e) {
             Log.d(TAG, e.getMessage() + " Deployment scan failed.");