From d12e85bea6fe14b9d413a856e4dd40a4ef00d001 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Thu, 22 Feb 2007 23:48:49 +0000 Subject: [PATCH] Fix path for Vista's use so the security manager doesn't bite us. --- .../com/threerings/getdown/launcher/GetdownApplet.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/java/com/threerings/getdown/launcher/GetdownApplet.java b/src/java/com/threerings/getdown/launcher/GetdownApplet.java index baa390d..f680c75 100644 --- a/src/java/com/threerings/getdown/launcher/GetdownApplet.java +++ b/src/java/com/threerings/getdown/launcher/GetdownApplet.java @@ -241,7 +241,17 @@ public class GetdownApplet extends JApplet // when run from an applet, we install to the user's home directory String root; if (RunAnywhere.isWindows()) { + String verStr = System.getProperty("os.version"); root = "Application Data"; + try { + float version = Float.parseFloat(verStr); + if (version >= 6.0) { + // Vista makes us write it here.... Yay. + root = "AppData" + File.separator + "LocalLow"; + } + } catch (Exception e) { + Log.warning("Couldn't parse OS version: " +verStr); + } } else if (RunAnywhere.isMacOS()) { root = "Library" + File.separator + "Application Support"; } else /* isLinux() or something wacky */ {