changeset 52:c8ec2d7af3fb

Correct bad APPDATA code.
author davidb
date Tue, 14 Apr 2020 15:17:45 -0700
parents e8d2a7e6f6c7
children b1198e4bec25 a9d5c94a177c
files src/name/blackcap/clipman/Files.kt
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
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")