use filesDir absolutePath instead of path in some places

This commit is contained in:
tibbi 2018-07-18 13:24:37 +02:00
parent ec20d67fff
commit 007d972787
2 changed files with 2 additions and 2 deletions

View File

@ -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())

View File

@ -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
}