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