use filesDir absolutePath instead of path in some places
This commit is contained in:
parent
ec20d67fff
commit
007d972787
|
@ -205,7 +205,7 @@ fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList<String>, callback:
|
|||
var pathsCnt = paths.size
|
||||
paths.forEach {
|
||||
val file = File(it)
|
||||
val internalFile = File(filesDir, it)
|
||||
val internalFile = File(filesDir.absolutePath, it)
|
||||
try {
|
||||
if (file.copyRecursively(internalFile, true)) {
|
||||
mediumDao.updateDeleted(it, System.currentTimeMillis())
|
||||
|
|
|
@ -402,7 +402,7 @@ fun Context.getFavoritePaths() = galleryDB.MediumDao().getFavoritePaths() as Arr
|
|||
fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList<Medium> {
|
||||
val media = mediumDao.getDeletedMedia() as ArrayList<Medium>
|
||||
media.forEach {
|
||||
it.path = File(filesDir, it.path).toString()
|
||||
it.path = File(filesDir.absolutePath, it.path).toString()
|
||||
}
|
||||
return media
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue