diff src/name/blackcap/imageprep/Settings.kt @ 1:0bded24f746e

Compiles, still untested.
author David Barts <n5jrn@me.com>
date Thu, 16 Jul 2020 21:51:08 -0700
parents e0efe7848130
children a6f9b51d5e8d
line wrap: on
line diff
--- a/src/name/blackcap/imageprep/Settings.kt	Thu Jul 16 19:57:23 2020 -0700
+++ b/src/name/blackcap/imageprep/Settings.kt	Thu Jul 16 21:51:08 2020 -0700
@@ -3,6 +3,8 @@
  */
 package name.blackcap.imageprep
 
+import java.io.File
+
 /* work around name shadowing */
 private val _PROPS = PROPERTIES
 
@@ -18,7 +20,7 @@
         if (s.isNullOrEmpty())
             return homeDir
         if (s.startsWith("~/") || s.startsWith("~\\"))
-            return File(homeDir, s.substring(1).trimStart('/', '\\')).toString()
+            return File(homeDir, s.substring(2).trimStart(s[1])).toString()
         else
             return s
     }