OSDN Git Service

Change generation of files/paths in home dir to use FileManager
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / dialog / ConfigDialog.java
index a4b8eea..ab985b8 100644 (file)
@@ -136,7 +136,7 @@ public class ConfigDialog extends QDialog {
                Global.setTagBehavior(appearancePage.getTagBehavior());\r
        FileOutputStream out = null;\r
                try {\r
-                       out = new FileOutputStream(Global.getDirectoryPath()+"secure.txt");\r
+                       out = new FileOutputStream(Global.getFileManager().getHomeDirFile("secure.txt"));\r
                } catch (FileNotFoundException e) {\r
                        // if it isn't found we'll write it.\r
                }\r
@@ -278,7 +278,7 @@ public class ConfigDialog extends QDialog {
                if (Global.username.equalsIgnoreCase("") || Global.password.equalsIgnoreCase("")) {\r
                AESEncrypter aes = new AESEncrypter();\r
                try {\r
-                               aes.decrypt(new FileInputStream(Global.getDirectoryPath()+"secure.txt"));\r
+                               aes.decrypt(new FileInputStream(Global.getFileManager().getHomeDirFile("secure.txt")));\r
                        } catch (FileNotFoundException e) {\r
                                // File not found, so we'll just get empty strings anyway. \r
                        }\r