mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +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;
|
||||
}
|
||||
|
||||
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/");
|
||||
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/img");
|
||||
|
||||
Log.d(TAG, "Result nodes: " + resultNodes);
|
||||
|
||||
boolean fileExists;
|
||||
if (resultNodes!=null) {
|
||||
if (!resultNodes.isEmpty()) {
|
||||
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);
|
||||
|
||||
return fileExists;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue