aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/com/tigervnc/vncviewer/FileUtils.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/java/com/tigervnc/vncviewer/FileUtils.java b/java/com/tigervnc/vncviewer/FileUtils.java
index cb5564be..8a9e268e 100644
--- a/java/com/tigervnc/vncviewer/FileUtils.java
+++ b/java/com/tigervnc/vncviewer/FileUtils.java
@@ -32,21 +32,11 @@ public class FileUtils {
String os = System.getProperty("os.name");
try {
if (os.startsWith("Windows")) {
- // JRE prior to 1.5 cannot reliably determine USERPROFILE
- // return user.home and hope it's right...
- if (Integer.parseInt(System.getProperty("java.version").split("\\.")[1]) < 5) {
- try {
- homeDir = System.getProperty("user.home");
- } catch(java.security.AccessControlException e) {
- vlog.error("Cannot access user.home system property:"+e.getMessage());
- }
- } else {
- homeDir = System.getenv("USERPROFILE");
- }
+ homeDir = System.getenv("USERPROFILE");
} else {
try {
- homeDir = FileSystemView.getFileSystemView().
- getDefaultDirectory().getCanonicalPath();
+ homeDir = FileSystemView.getFileSystemView().
+ getDefaultDirectory().getCanonicalPath();
} catch(java.security.AccessControlException e) {
vlog.error("Cannot access system property:"+e.getMessage());
}