]> source.dussan.org Git - tigervnc.git/commitdiff
The previous fix to the NullPointer issue did not work, because it was simply setting...
authorDRC <dcommander@users.sourceforge.net>
Wed, 5 Oct 2011 21:39:59 +0000 (21:39 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 5 Oct 2011 21:39:59 +0000 (21:39 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4710 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tigervnc/rfb/CSecurityTLS.java
java/src/com/tigervnc/vncviewer/UserPrefs.java

index 2fbd5aab3f448f6bf3a5eb01af02c4c230a6c4fd..73eb6199a0636793f457bbebef0cbd73fa69707d 100644 (file)
@@ -106,8 +106,8 @@ public class CSecurityTLS extends CSecurity {
       return;
     }
 
-    String vnchomedir = homeDir+UserPrefs.getFileSeperator()+".vnc"+
-                        UserPrefs.getFileSeperator();
+    String vnchomedir = homeDir+UserPrefs.getFileSeparator()+".vnc"+
+                        UserPrefs.getFileSeparator();
     String caDefault = new String(vnchomedir+"x509_ca.pem");
     String crlDefault = new String(vnchomedir+"x509_crl.pem");
 
index f72ed5ab73d2bd84466737bc1781f4a153d969f5..bc2cf0f118018930ea5050cd5a1ad36d17bf976a 100644 (file)
@@ -39,7 +39,7 @@ import javax.swing.filechooser.*;
  */
 
 public class UserPrefs extends Properties {
-       String userhome=null; //This will have fileseperator on end if it
+       String userhome=null; //This will have fileseparator on end if it
        String prefFile;
        String appName;
        
@@ -65,7 +65,7 @@ public class UserPrefs extends Properties {
                }
                // This is guaranteed as always being some valid directory,
                // according to spec.
-               prefFile= getHomeDir()+getFileSeperator()+
+               prefFile= getHomeDir()+getFileSeparator()+
                 "."+appName;
                try {
                        load(new java.io.FileInputStream(prefFile));
@@ -157,14 +157,14 @@ public class UserPrefs extends Properties {
     return userName;
   }
 
-  final public static String getFileSeperator() {
-    String seperator = null;
+  final public static String getFileSeparator() {
+    String separator = null;
                try {
-                       seperator = (String)System.getProperties().get("file.separator");
+                       separator = Character.toString(java.io.File.separatorChar);
                } catch(java.security.AccessControlException e) {
                        System.out.println("Cannot access file.separator system property");
                }
-    return seperator;
+    return separator;
   }
 
        /**