corrected a bug with file path when decrypting
This commit is contained in:
parent
a0263aabad
commit
1579a6347e
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue