fix(backup): allow selecting SFLB archives for restore

This commit is contained in:
zarzet
2026-09-07 19:38:14 +07:00
parent c0f6a60706
commit 259fb5b6c0
2 changed files with 63 additions and 4 deletions
@@ -74,10 +74,10 @@ class _BackupRestorePageState extends ConsumerState<BackupRestorePage> {
BackupBundle? bundle;
try {
final picked = await FilePicker.pickFile(
type: FileType.custom,
allowedExtensions: ['json', BackupService.fileExtension],
);
// Android resolves custom extensions to MIME types. It recognizes JSON
// but not SFLB, so mixing them hides our own backups. Validate contents
// with BackupService after selection instead of filtering by extension.
final picked = await FilePicker.pickFile(type: FileType.any);
if (picked == null) return;
final path = picked.path;
bundle = path != null