mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-18 21:10:35 +01:00
fix #837, add an extra check to make sure bin files are restoring properly
This commit is contained in:
parent
8d7366d228
commit
a8ea2ddbd8
@ -236,7 +236,9 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList<String>, callback
|
||||
out = getFileOutputStreamSync(destination, source.getMimeType())
|
||||
inputStream = getFileInputStreamSync(source)!!
|
||||
inputStream.copyTo(out!!)
|
||||
mediumDao.updateDeleted(destination, 0)
|
||||
if (File(source).length() == File(destination).length()) {
|
||||
mediumDao.updateDeleted(destination, 0)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user