mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
No more NULL pointers from getDirectoryContent (2)
This commit is contained in:
parent
e81a7790eb
commit
b59784af89
2 changed files with 3 additions and 3 deletions
|
@ -257,7 +257,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
// click on folder in the list
|
||||
Log.d(TAG, "on item click");
|
||||
Vector<OCFile> tmpfiles = mStorageManager.getDirectoryContent(mFile);
|
||||
if (tmpfiles == null) return;
|
||||
if (tmpfiles.size() <= 0) return;
|
||||
// filter on dirtype
|
||||
Vector<OCFile> files = new Vector<OCFile>();
|
||||
for (OCFile f : tmpfiles)
|
||||
|
@ -325,7 +325,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro
|
|||
mFile = mStorageManager.getFileByPath(full_path);
|
||||
if (mFile != null) {
|
||||
Vector<OCFile> files = mStorageManager.getDirectoryContent(mFile);
|
||||
if (files != null) {
|
||||
if (files.size() > 0) {
|
||||
List<HashMap<String, Object>> data = new LinkedList<HashMap<String,Object>>();
|
||||
for (OCFile f : files) {
|
||||
HashMap<String, Object> h = new HashMap<String, Object>();
|
||||
|
|
|
@ -456,7 +456,7 @@ public class FileDataStorageManager implements DataStorageManager {
|
|||
// TODO consider possible failures
|
||||
if (dir != null && dir.isDirectory() && dir.getFileId() != -1) {
|
||||
Vector<OCFile> children = getDirectoryContent(dir);
|
||||
if (children != null) {
|
||||
if (children.size() > 0) {
|
||||
OCFile child = null;
|
||||
for (int i=0; i<children.size(); i++) {
|
||||
child = children.get(i);
|
||||
|
|
Loading…
Reference in a new issue