diff src/name/blackcap/exifwasher/Files.kt @ 22:cd2ca4727b7f

Builds under Windows.
author davidb
date Thu, 16 Apr 2020 11:10:39 -0700
parents dc1f4359659d
children
line wrap: on
line diff
--- a/src/name/blackcap/exifwasher/Files.kt	Sun Apr 12 18:46:57 2020 -0700
+++ b/src/name/blackcap/exifwasher/Files.kt	Thu Apr 16 11:10:39 2020 -0700
@@ -42,15 +42,14 @@
 private val SHORTNAME = "exifwasher"
 private val LONGNAME = "name.blackcap." + SHORTNAME
 private val HOME = System.getenv("HOME")
-private val APPDATA = System.getenv("APPDATA")
 val PF_DIR = when (OS.type) {
     OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME)
-    OS.WINDOWS -> joinPath(APPDATA, "Roaming", LONGNAME)
+    OS.WINDOWS -> joinPath(System.getenv("APPDATA"), LONGNAME)
     else -> joinPath(HOME, "." + SHORTNAME)
 }
 val LF_DIR = when (OS.type) {
     OS.MAC -> joinPath(HOME, "Library", "Application Support", LONGNAME)
-    OS.WINDOWS -> joinPath(APPDATA, "Local", LONGNAME)
+    OS.WINDOWS -> joinPath(System.getenv("LOCALAPPDATA"), LONGNAME)
     else -> joinPath(HOME, "." + SHORTNAME)
 }
 val PROP_FILE = File(PF_DIR, SHORTNAME + ".properties")