diff options
author | zeapo <mohamed@zenadi.com> | 2015-01-04 16:27:26 +0100 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2015-01-04 16:27:26 +0100 |
commit | e170ef281b4d8f9b4c49d41faa077b06b1c9a84a (patch) | |
tree | 46aebe17f6185f76b297eb2757474ba3e85524d0 /app/src/main/java/com | |
parent | 78a2494d5e6fc2e479a5a4d98891d5ee1e04aeeb (diff) |
uri is useless here
Diffstat (limited to 'app/src/main/java/com')
3 files changed, 9 insertions, 11 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java index 5bb44b32..6307fd0d 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java @@ -464,7 +464,7 @@ public class GitActivity extends ActionBarActivity { username = hostname.split("@")[0]; } - if (localDir.exists()) { + if (localDir.exists() && localDir.listFiles().length != 0) { new AlertDialog.Builder(this). setTitle(R.string.dialog_delete_title). setMessage(R.string.dialog_delete_msg). @@ -565,9 +565,9 @@ public class GitActivity extends ActionBarActivity { GitOperation op; if (operation == REQUEST_PULL) { - op = new PullOperation(localDir, activity).setCommand(hostname); + op = new PullOperation(localDir, activity).setCommand(); } else if (operation == REQUEST_PUSH) { - op = new PushOperation(localDir, activity).setCommand(hostname); + op = new PushOperation(localDir, activity).setCommand(); } else { Log.e(TAG, "Sync operation not recognized : " + operation); return; @@ -594,11 +594,11 @@ public class GitActivity extends ActionBarActivity { switch (requestCode) { case REQUEST_PULL: - op = new PullOperation(localDir, activity).setCommand(hostname); + op = new PullOperation(localDir, activity).setCommand(); break; case REQUEST_PUSH: - op = new PushOperation(localDir, activity).setCommand(hostname); + op = new PushOperation(localDir, activity).setCommand(); break; case GitOperation.GET_SSH_KEY_FROM_CLONE: diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.java b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.java index 2d499b4e..abf4bfe6 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.java @@ -20,11 +20,10 @@ public class PullOperation extends GitOperation { } /** - * Sets the command using the repository uri - * @param uri the uri of the repository + * Sets the command * @return the current object */ - public PullOperation setCommand(String uri) { + public PullOperation setCommand() { this.command = new Git(repository) .pull() .setRebase(true) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.java b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.java index fd4fb229..73ed05ff 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.java @@ -20,11 +20,10 @@ public class PushOperation extends GitOperation { } /** - * Sets the command using the repository uri - * @param uri the uri of the repository + * Sets the command * @return the current object */ - public PushOperation setCommand(String uri) { + public PushOperation setCommand() { this.command = new Git(repository) .push() .setPushAll() |