mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-08-30 17:06:13 +08:00
fix: resolve comments
This commit is contained in:
Vendored
+7
-1
@@ -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: (
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user