diff src/name/blackcap/clipman/Files.kt @ 52:c8ec2d7af3fb

Correct bad APPDATA code.
author davidb
date Tue, 14 Apr 2020 15:17:45 -0700
parents 19d9da731c43
children 88056f373a94
line wrap: on
line diff
--- a/src/name/blackcap/clipman/Files.kt	Tue Apr 14 14:35:04 2020 -0700
+++ b/src/name/blackcap/clipman/Files.kt	Tue Apr 14 15:17:45 2020 -0700
@@ -43,15 +43,14 @@
 private val SHORTNAME = "clipman"
 private val LONGNAME = "name.blackcap." + SHORTNAME
 private val HOME = System.getenv("HOME")
-private val APPDATA = System.getenv("APPDATA")
 private 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)
 }
 private 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")