mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add checks for result Nodes and fileExists
This commit is contained in:
parent
91c6b3518c
commit
c1e764e7c7
1 changed files with 11 additions and 1 deletions
|
|
@ -51,7 +51,17 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/");
|
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/");
|
||||||
boolean fileExists = resultNodes!=null;
|
|
||||||
|
Log.d(TAG, "Result nodes: " + resultNodes);
|
||||||
|
|
||||||
|
boolean fileExists;
|
||||||
|
if (resultNodes!=null) {
|
||||||
|
fileExists = true;
|
||||||
|
} else {
|
||||||
|
fileExists = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//FIXME: This always returns false even when file (and nodes) exists, why?
|
||||||
Log.d(TAG, "File already exists in Commons:" + fileExists);
|
Log.d(TAG, "File already exists in Commons:" + fileExists);
|
||||||
|
|
||||||
return fileExists;
|
return fileExists;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue