mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
corrected a bug with file path when decrypting
This commit is contained in:
@@ -158,12 +158,12 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI
|
|||||||
try {
|
try {
|
||||||
byte[] data = new byte[0];
|
byte[] data = new byte[0];
|
||||||
try {
|
try {
|
||||||
data = FileUtils.readFileToByteArray(PasswordRepository.getFile(item.getName()));
|
data = FileUtils.readFileToByteArray(item.getFile());
|
||||||
|
|
||||||
Intent intent = new Intent(this, PgpHandler.class);
|
Intent intent = new Intent(this, PgpHandler.class);
|
||||||
intent.putExtra("PGP-ID", FileUtils.readFileToString(PasswordRepository.getFile("/.gpg-id")));
|
intent.putExtra("PGP-ID", FileUtils.readFileToString(PasswordRepository.getFile("/.gpg-id")));
|
||||||
intent.putExtra("NAME", item.getName());
|
intent.putExtra("NAME", item.getName());
|
||||||
intent.putExtra("FILE_PATH", PasswordRepository.getFile(item.getName()).getAbsolutePath());
|
intent.putExtra("FILE_PATH", item.getFile().getAbsolutePath());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@@ -75,7 +75,7 @@ public class PasswordRepository {
|
|||||||
|
|
||||||
String[] parts = fileName.split("/");
|
String[] parts = fileName.split("/");
|
||||||
if (parts.length == 1) {
|
if (parts.length == 1) {
|
||||||
passwordList.add(PasswordItem.newPassword(parts[0], file.getParentFile()));
|
passwordList.add(PasswordItem.newPassword(parts[0], file));
|
||||||
} else {
|
} else {
|
||||||
if (!passwordList.contains(PasswordItem.newCategory(parts[0], file.getParentFile()))) {
|
if (!passwordList.contains(PasswordItem.newCategory(parts[0], file.getParentFile()))) {
|
||||||
passwordList.add(PasswordItem.newCategory(parts[0], file.getParentFile()));
|
passwordList.add(PasswordItem.newCategory(parts[0], file.getParentFile()));
|
||||||
|
Reference in New Issue
Block a user