Add 'if' check for file exists

This commit is contained in:
misaochan 2016-12-15 15:24:01 +13:00
parent b6997db681
commit b5ccc36a77

View file

@ -77,6 +77,8 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
super.onPostExecute(fileExists); super.onPostExecute(fileExists);
//TODO: Add Dialog here to tell user file exists, do you want to continue? Yes/No //TODO: Add Dialog here to tell user file exists, do you want to continue? Yes/No
if (fileExists) {
AlertDialog.Builder builder = new AlertDialog.Builder(context); AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("This file already exists in Commons. Are you sure you want to proceed?") builder.setMessage("This file already exists in Commons. Are you sure you want to proceed?")
@ -98,4 +100,5 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
AlertDialog dialog = builder.create(); AlertDialog dialog = builder.create();
dialog.show(); dialog.show();
} }
}
} }