File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
source/core/data/src/main/kotlin/com/xayah/core/data/repository Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.xayah.core.data.R
66import com.xayah.core.database.dao.DirectoryDao
77import com.xayah.core.database.dao.PackageDao
88import com.xayah.core.datastore.ConstantUtil
9+ import com.xayah.core.datastore.ConstantUtil.DEFAULT_PATH_PARENT
910import com.xayah.core.datastore.readBackupSavePath
1011import com.xayah.core.datastore.saveBackupSavePath
1112import com.xayah.core.model.StorageType
@@ -79,7 +80,10 @@ class DirectoryRepository @Inject constructor(
7980
8081 // Internal storage
8182 val internalList = rootService.listFilePaths(ConstantUtil .STORAGE_EMULATED_PATH , listFiles = false )
82- .filter { it.substring(it.lastIndexOf(" /" ) + 1 ).toIntOrNull() != null } // Just select 0 10 999 etc.
83+ .filter { it.substring(it.lastIndexOf(" /" ) + 1 ).toIntOrNull() != null }.toMutableList() // Just select 0 10 999 etc.
84+ if (internalList.contains(DEFAULT_PATH_PARENT ).not ()) {
85+ internalList.add(DEFAULT_PATH_PARENT )
86+ }
8387 val internalDirs = mutableListOf<DirectoryUpsertEntity >()
8488 for (storageItem in internalList) {
8589 // e.g. /data/media/0
You can’t perform that action at this time.
0 commit comments