mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
catch exceptions thrown at fetching nomedia folders
This commit is contained in:
parent
7093640f66
commit
8896730d8b
2 changed files with 3 additions and 2 deletions
|
@ -77,7 +77,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.31.16'
|
||||
implementation 'com.simplemobiletools:commons:5.31.17'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
|
||||
|
|
|
@ -326,10 +326,11 @@ fun Context.getNoMediaFoldersSync(): ArrayList<String> {
|
|||
val path = cursor.getStringValue(Files.FileColumns.DATA) ?: continue
|
||||
val noMediaFile = File(path)
|
||||
if (getDoesFilePathExist(noMediaFile.absolutePath, OTGPath) && noMediaFile.name == NOMEDIA) {
|
||||
folders.add("${noMediaFile.parent}")
|
||||
folders.add(noMediaFile.parent)
|
||||
}
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue