mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
try removing temp folder only if the path isnt empty
This commit is contained in:
parent
4e530d0517
commit
6c7e406dad
1 changed files with 7 additions and 5 deletions
|
@ -209,6 +209,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun removeTempFolder() {
|
||||
if (config.tempFolderPath.isNotEmpty()) {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
|
@ -217,6 +218,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
config.tempFolderPath = ""
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryloadGallery() {
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
|
|
Loading…
Reference in a new issue