Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: await openPath fallback and other review fixes

saivaraprasadreddy medapatic6d33aa82a99
diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts
index 5868160d8..15c12f9eb 100644
--- a/electron/electron-env.d.ts
+++ b/electron/electron-env.d.ts
@@ -39,7 +39,7 @@ interface Window {
setCurrentVideoPath: (path: string) => Promise<{ success: boolean }>
getCurrentVideoPath: () => Promise<{ success: boolean; path?: string }>
clearCurrentVideoPath: () => Promise<{ success: boolean }>
- getPlatform: () => Promise<string>,
+ getPlatform: () => Promise<string>
revealInFolder: (filePath: string) => Promise<{ success: boolean; error?: string; message?: string }>,
hudOverlayHide: () => void;
hudOverlayClose: () => void;
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts
index 5c9827cc9..4936dc68d 100644
--- a/electron/ipc/handlers.ts
+++ b/electron/ipc/handlers.ts
@@ -209,7 +209,11 @@ export function registerIpcHandlers(
// This might happen if the file was moved or deleted after export,
// or if the path is somehow invalid for showItemInFolder
try {
- shell.openPath(path.dirname(filePath));
+ const openPathResult = await shell.openPath(path.dirname(filePath));
+ if (openPathResult) {
+ // openPath returned an error message
+ return { success: false, error: openPathResult };
+ }
return { success: true, message: 'Could not reveal item, but opened directory.' };
} catch (openError) {
console.error(`Error opening directory: ${path.dirname(filePath)}`, openError);
diff --git a/src/components/video-editor/ExportDialog.tsx b/src/components/video-editor/ExportDialog.tsx
index af9dde8ea..7a77e2542 100644
--- a/src/components/video-editor/ExportDialog.tsx
+++ b/src/components/video-editor/ExportDialog.tsx
@@ -112,13 +112,10 @@ export function ExportDialog({
<div className="w-12 h-12 rounded-full bg-[#34B27B]/20 flex items-center justify-center ring-1 ring-[#34B27B]/50">
<Download className="w-6 h-6 text-[#34B27B]" />
</div>
- <div className="w-12 h-12 rounded-full bg-[#34B27B]/20 flex items-center justify-center ring-1 ring-[#34B27B]/50">
- <Download className="w-6 h-6 text-[#34B27B]" />
- </div>
- <div className="flex flex-col gap-2"> {/* Added flex container */}
+ <div className="flex flex-col gap-2">
<span className="text-xl font-bold text-slate-200 block">Export Complete</span>
<span className="text-sm text-slate-400">Your {formatLabel.toLowerCase()} is ready</span>
- {exportedFilePath && ( // Only show button if path exists
+ {exportedFilePath && (
<Button
variant="secondary"
onClick={handleClickShowInFolder}
@@ -127,6 +124,11 @@ export function ExportDialog({
Show in Folder
</Button>
)}
+ {exportedFilePath && (
+ <span className="text-xs text-slate-500 break-all max-w-xs mt-1">
+ {exportedFilePath.split('/').pop()}
+ </span>
+ )}
</div>
</>
) : (
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index 354cda9f5..c116825cc 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -722,7 +722,7 @@ export default function VideoEditor() {
}, []);
const showExportSuccessToast = useCallback((filePath: string) => {
- toast.success(`Video exported successfully to ${filePath}`, {
+ toast.success(`Exported successfully to ${filePath}`, {
action: {
label: 'Show in Folder',
onClick: async () => {