mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Fix issue with fileExists always returning false
This commit is contained in:
parent
c1e764e7c7
commit
06e58b57b8
1 changed files with 3 additions and 4 deletions
|
|
@ -50,18 +50,17 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/");
|
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/img");
|
||||||
|
|
||||||
Log.d(TAG, "Result nodes: " + resultNodes);
|
Log.d(TAG, "Result nodes: " + resultNodes);
|
||||||
|
|
||||||
boolean fileExists;
|
boolean fileExists;
|
||||||
if (resultNodes!=null) {
|
if (!resultNodes.isEmpty()) {
|
||||||
fileExists = true;
|
fileExists = true;
|
||||||
} else {
|
} else {
|
||||||
fileExists = false;
|
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