summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorZeapo <mohamed@zenadi.com>2014-08-01 00:22:15 +0100
committerZeapo <mohamed@zenadi.com>2014-08-01 00:22:15 +0100
commit1579a6347ea415aae4fe354118af3a19592c4c5f (patch)
tree63d525256edab20b176fb155013cb5fa66a342e1 /app/src
parenta0263aabadf04869da704a0075f01bfde98f279a (diff)
corrected a bug with file path when decrypting
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java2
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()));