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,13 +209,15 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun removeTempFolder() {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
deleteFile(newFolder, true)
|
||||
if (config.tempFolderPath.isNotEmpty()) {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
deleteFile(newFolder, true)
|
||||
}
|
||||
}
|
||||
config.tempFolderPath = ""
|
||||
}
|
||||
config.tempFolderPath = ""
|
||||
}
|
||||
|
||||
private fun tryloadGallery() {
|
||||
|
|
Loading…
Reference in a new issue