do not check for gpg-id file fix #51

This commit is contained in:
zeapo 2015-01-02 23:54:30 +01:00
parent 41ae2ee951
commit 3b29602ca1

View file

@ -286,6 +286,7 @@ public class PasswordStore extends ActionBarActivity {
status = folders.length; status = folders.length;
// this means that the repository has been correctly cloned // this means that the repository has been correctly cloned
// if this file does not exist, well... this will not work if there is no other files
if ((new File(localDir.getAbsolutePath() + "/.gpg-id")).exists()) if ((new File(localDir.getAbsolutePath() + "/.gpg-id")).exists())
status++; status++;
} }
@ -347,19 +348,13 @@ public class PasswordStore extends ActionBarActivity {
} }
public void decryptPassword(PasswordItem item) { public void decryptPassword(PasswordItem item) {
try { this.leftActivity = true;
this.leftActivity = true;
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("NAME", item.toString());
intent.putExtra("NAME", item.toString()); intent.putExtra("FILE_PATH", item.getFile().getAbsolutePath());
intent.putExtra("FILE_PATH", item.getFile().getAbsolutePath()); intent.putExtra("Operation", "DECRYPT");
intent.putExtra("Operation", "DECRYPT"); startActivityForResult(intent, PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY);
startActivityForResult(intent, PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY);
} catch (IOException e) {
e.printStackTrace();
}
} }
public void createPassword(View v) { public void createPassword(View v) {
@ -367,15 +362,10 @@ public class PasswordStore extends ActionBarActivity {
Log.i("PWDSTR", "Adding file to : " + this.currentDir.getAbsolutePath()); Log.i("PWDSTR", "Adding file to : " + this.currentDir.getAbsolutePath());
this.leftActivity = true; this.leftActivity = true;
try { Intent intent = new Intent(this, PgpHandler.class);
Intent intent = new Intent(this, PgpHandler.class); intent.putExtra("FILE_PATH", getCurrentDir().getAbsolutePath());
intent.putExtra("PGP-ID", FileUtils.readFileToString(PasswordRepository.getFile("/.gpg-id"))); intent.putExtra("Operation", "ENCRYPT");
intent.putExtra("FILE_PATH", getCurrentDir().getAbsolutePath()); startActivityForResult(intent, PgpHandler.REQUEST_CODE_ENCRYPT);
intent.putExtra("Operation", "ENCRYPT");
startActivityForResult(intent, PgpHandler.REQUEST_CODE_ENCRYPT);
} catch (Exception e) {
e.printStackTrace();
}
} }
public void deletePassword(final PasswordRecyclerAdapter adapter, final int position) { public void deletePassword(final PasswordRecyclerAdapter adapter, final int position) {