diff --git a/apps/mobile/app/screens/settings/restore-backup/index.tsx b/apps/mobile/app/screens/settings/restore-backup/index.tsx index 46dfd076d..0c1e8b6b2 100644 --- a/apps/mobile/app/screens/settings/restore-backup/index.tsx +++ b/apps/mobile/app/screens/settings/restore-backup/index.tsx @@ -95,6 +95,15 @@ const restoreBackup = async (options: { deleteFile?: boolean; }) => { try { + if ( + !options.uri.endsWith(".nnbackup") && + !options.uri.endsWith(".nnbackupz") + ) { + throw new Error( + `Invalid backup file selected. Only .nnbackup and .nnbackupz files can be restored.` + ); + } + const isLegacyBackup = options.uri.endsWith(".nnbackup"); startProgress({