diff options
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordStore.java | 4 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java index 6a601a3b..d8d59e4e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java @@ -158,12 +158,12 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI try { byte[] data = new byte[0]; try { - data = FileUtils.readFileToByteArray(PasswordRepository.getFile(item.getName())); + data = FileUtils.readFileToByteArray(item.getFile()); Intent intent = new Intent(this, PgpHandler.class); intent.putExtra("PGP-ID", FileUtils.readFileToString(PasswordRepository.getFile("/.gpg-id"))); intent.putExtra("NAME", item.getName()); - intent.putExtra("FILE_PATH", PasswordRepository.getFile(item.getName()).getAbsolutePath()); + intent.putExtra("FILE_PATH", item.getFile().getAbsolutePath()); startActivity(intent); } catch (IOException e) { diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java index 5f42b956..551b8015 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java @@ -75,7 +75,7 @@ public class PasswordRepository { String[] parts = fileName.split("/"); if (parts.length == 1) { - passwordList.add(PasswordItem.newPassword(parts[0], file.getParentFile())); + passwordList.add(PasswordItem.newPassword(parts[0], file)); } else { if (!passwordList.contains(PasswordItem.newCategory(parts[0], file.getParentFile()))) { passwordList.add(PasswordItem.newCategory(parts[0], file.getParentFile())); |