diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/backup/BackupViewModel.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/backup/BackupViewModel.kt index 09f18df6..0a557ff5 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/backup/BackupViewModel.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/backup/BackupViewModel.kt @@ -19,8 +19,8 @@ class BackupViewModel : ViewModel() { fun loadBackups() { viewModelScope.launch { - File(BackupHelper.backupRootPath).listFiles { _, name -> - return@listFiles name.endsWith(BackupHelper.BACKUP_EXTENSION) + File(BackupHelper.backupRootPath).listFiles { file, _ -> + return@listFiles file.extension == BackupHelper.BACKUP_EXTENSION }?.toList()?.let { backupsMutableLiveData.value = it }