Android: Always regenerate the ssh key when calling generateSSHKeys

If it already existed we would give an error about it already existing,
but the user would have no recourse of action, apart from uninstall and
reinstalling the app.
This commit is contained in:
Vishesh Handa
2019-12-01 15:49:31 +01:00
parent b7b6dc213e
commit 9b27dedcb2

View File

@ -31,9 +31,7 @@ public class GenerateSSHKeysTask extends AsyncTask<String, Void, Void> {
File privateKeyFile = new File(privateKeyPath); File privateKeyFile = new File(privateKeyPath);
if (privateKeyFile.exists()) { if (privateKeyFile.exists()) {
Log.d(TAG, "Private key already exists"); Log.d(TAG, "Private key already exists. Overwriting");
result.error("FAILED", "Private key already exists", null);
return null;
} }
Git git = new Git(); Git git = new Git();