X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=blobdiff_plain;f=src%2Fcx%2Ffbn%2Fnevernote%2FNeverNote.java;h=7af20d597cc9aca2898459aaaa74dcaf3dfd5c7d;hp=3153cd9f540223bc75c950d9b9e461c3a478a0b8;hb=abc74d82922cc69ae096c6bc9111bbd0c134cdce;hpb=77a42db3804daa3199c0b7e4ab8fe612396c93a3 diff --git a/src/cx/fbn/nevernote/NeverNote.java b/src/cx/fbn/nevernote/NeverNote.java index 3153cd9..7af20d5 100644 --- a/src/cx/fbn/nevernote/NeverNote.java +++ b/src/cx/fbn/nevernote/NeverNote.java @@ -873,7 +873,8 @@ public class NeverNote extends QMainWindow{ */ } private void unlockApplication() { - String fileName = Global.currentDir +"nevernote.lock"; + // NFC TODO: should this be removed? Looks like H2 now handles the locking, which it will clean up itself. See #lockApplication. + String fileName = Global.getFileManager().getHomeDirPath("nevernote.lock"); if (QFile.exists(fileName)) { QFile.remove(fileName); } @@ -1846,7 +1847,7 @@ public class NeverNote extends QMainWindow{ QTextEdit textBox = new QTextEdit(); layout.addWidget(textBox); textBox.setReadOnly(true); - QFile file = new QFile(Global.getDirectoryPath()+"release.txt"); + QFile file = new QFile(Global.getFileManager().getHomeDirPath("release.txt")); if (!file.open(new QIODevice.OpenMode(QIODevice.OpenModeFlag.ReadOnly, QIODevice.OpenModeFlag.Text))) return; @@ -2238,7 +2239,7 @@ public class NeverNote extends QMainWindow{ AESEncrypter aes = new AESEncrypter(); try { - aes.decrypt(new FileInputStream(Global.getDirectoryPath()+"secure.txt")); + aes.decrypt(new FileInputStream(Global.getFileManager().getHomeDirFile("secure.txt"))); } catch (FileNotFoundException e) { // File not found, so we'll just get empty strings anyway. }