fix: resolve comments

This commit is contained in:
AbhinRustagi
2026-05-08 05:24:40 +05:30
parent b801c1ccea
commit 25cfd2777f
4 changed files with 32 additions and 7 deletions
+7 -1
View File
@@ -77,7 +77,13 @@ interface Window {
videoData: ArrayBuffer,
fileName: string,
exportFolder?: string,
) => Promise<{ success: boolean; path?: string; message?: string; canceled?: boolean }>;
) => Promise<{
success: boolean;
path?: string;
message?: string;
canceled?: boolean;
error?: string;
}>;
openVideoFilePicker: () => Promise<{ success: boolean; path?: string; canceled?: boolean }>;
setCurrentVideoPath: (path: string) => Promise<{ success: boolean }>;
setCurrentRecordingSession: (
+8 -2
View File
@@ -842,8 +842,14 @@ export function registerIpcHandlers(
if (stats.isDirectory()) {
defaultDir = exportFolder;
}
} catch {
// Folder was moved or deleted since the last export; keep Downloads.
} catch (err) {
// Stat can fail because the folder was moved/deleted (expected) or
// because of a permission error (worth surfacing). Either way we
// fall back to Downloads, but log so debugging isn't blind.
console.warn(
`Could not access remembered export folder "${exportFolder}", falling back to Downloads:`,
err,
);
}
}