fix copying whole folders on the internal storage

This commit is contained in:
tibbi 2018-02-25 09:43:10 +01:00
parent 4e8197b886
commit b8dd4bd5ab

View file

@ -221,7 +221,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
val paths = ArrayList<String>()
selectedPositions.forEach {
val dir = File(dirs[it].path)
paths.addAll(dir.list().filter { !activity.getIsPathDirectory(it) && it.isImageVideoGif() })
paths.addAll(dir.listFiles().filter { !activity.getIsPathDirectory(it.absolutePath) && it.absolutePath.isImageVideoGif() }.map { it.absolutePath })
}
val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList<FileDirItem>