From 711d61535cee804672e30d9724c318e47cc018be Mon Sep 17 00:00:00 2001 From: Marcus Gosselin Date: Sun, 16 Nov 2014 06:32:20 -0800 Subject: [PATCH 1/2] fixed decryption of names --- src/Item.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Item.java b/src/Item.java index 81049f6..a46bc99 100644 --- a/src/Item.java +++ b/src/Item.java @@ -135,7 +135,7 @@ public class Item { name = file.getName(); if(name.endsWith(".enc")) { - name = Viewer.encryptor.decryptName(name.substring(0, name.length() - 4)); + name = Viewer.encryptor.nameTable.decrypt(name.substring(0, name.length() - 4)); } } else if (path.equals("\\drives")) { From 4ddb45c1cdcd5f230ff5a66c8fa9114861a29e2d Mon Sep 17 00:00:00 2001 From: Marcus Gosselin Date: Sun, 16 Nov 2014 06:33:26 -0800 Subject: [PATCH 2/2] changed currentdirectory variable bug where it would try and access places that didn't exist. defaults to desktop now --- src/Viewer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Viewer.java b/src/Viewer.java index 7a7531e..547b43d 100644 --- a/src/Viewer.java +++ b/src/Viewer.java @@ -25,7 +25,7 @@ public class Viewer implements BasicApp { private static int WIDTH = 800, HEIGHT = 600; // we need to have a home in case all else fails. - private static final String defaultSearchDirectory = System.getenv("APPDATA") + "\\MAndWorks\\MAndApps\\Backgrounds\\"; + private static final String defaultSearchDirectory = System.getenv("USERPROFILE") + "\\Desktop"; // current selection private static int selection = 0; @@ -74,7 +74,7 @@ public class Viewer implements BasicApp { // make sure we have our variable and file // we can explicitly set them as we are trying to pick up where we left // off - currentDirectoryVariable = new Variable("MAndWorks\\MAndApps\\Settings", "WallpaperSearchDirectory", defaultSearchDirectory, false); + currentDirectoryVariable = new Variable("MAndWorks\\MAndViewer", "currentDirectory", defaultSearchDirectory, false); currentDirectoryFile = new File(currentDirectoryVariable.getValue()); // which we use, be it variable or file, is completely arbitrary here.