Merge pull request #1082 from owncloud/ignoreHiddenFiles

ignore hidden files also if they are images for counting
This commit is contained in:
masensio 2015-08-24 13:06:36 +02:00
commit 8c9270e114
2 changed files with 13 additions and 3 deletions

View file

@ -543,6 +543,13 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
FileStorageUtils.getMimeTypeFromName(mRemotePath).startsWith("image/"));
}
/**
* @return 'True' if the file is hidden
*/
public boolean isHidden() {
return getFileName().startsWith(".");
}
public String getPermissions() {
return mPermissions;
}

View file

@ -496,9 +496,12 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
if (file.isFolder()) {
foldersCount++;
} else {
filesCount++;
if (file.isImage()){
imagesCount++;
if (!file.isHidden()) {
filesCount++;
if (file.isImage()) {
imagesCount++;
}
}
}
}