mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
show only media folders that exist
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
43323e1669
commit
750bfbc3c4
1 changed files with 2 additions and 2 deletions
|
@ -118,8 +118,8 @@ public final class MediaProvider {
|
|||
filePath = cursorImages.getString(cursorImages.getColumnIndexOrThrow(
|
||||
MediaStore.MediaColumns.DATA));
|
||||
|
||||
// check if valid path
|
||||
if (filePath != null && filePath.lastIndexOf('/') > 0) {
|
||||
// check if valid path and file exists
|
||||
if (filePath != null && filePath.lastIndexOf('/') > 0 && new File(filePath).exists()) {
|
||||
mediaFolder.filePaths.add(filePath);
|
||||
mediaFolder.absolutePath = filePath.substring(0, filePath.lastIndexOf('/'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue