mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +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
1 changed files with 3 additions and 1 deletions
|
@ -236,7 +236,9 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList<String>, callback
|
|||
out = getFileOutputStreamSync(destination, source.getMimeType())
|
||||
inputStream = getFileInputStreamSync(source)!!
|
||||
inputStream.copyTo(out!!)
|
||||
if (File(source).length() == File(destination).length()) {
|
||||
mediumDao.updateDeleted(destination, 0)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue