From 04f9880c9ab3f83495c51eda59d1b3fc1447361a Mon Sep 17 00:00:00 2001 From: Reese Wright Date: Mon, 2 Feb 2026 14:26:34 +0000 Subject: [PATCH 1/3] fix audio export path resolution --- tauri/src/platform/filesystem.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tauri/src/platform/filesystem.ts b/tauri/src/platform/filesystem.ts index e37b4d18..fc5083b9 100644 --- a/tauri/src/platform/filesystem.ts +++ b/tauri/src/platform/filesystem.ts @@ -10,9 +10,20 @@ export const tauriFilesystem: PlatformFilesystem = { }); if (filePath) { - const { writeBinaryFile } = await import('@tauri-apps/plugin-fs'); + const resolvedPath = + typeof filePath === 'string' + ? filePath + : filePath && typeof filePath === 'object' && 'path' in filePath + ? (filePath as { path: string }).path + : ''; + + if (!resolvedPath) { + throw new Error('Failed to resolve save path'); + } + + const { writeFile } = await import('@tauri-apps/plugin-fs'); const arrayBuffer = await blob.arrayBuffer(); - await writeBinaryFile(filePath, new Uint8Array(arrayBuffer)); + await writeFile(resolvedPath, new Uint8Array(arrayBuffer)); } } catch (error) { console.error('Failed to use Tauri dialog, falling back to browser download:', error); From 99fbcca7f495c3759aa8c9b1b18bee4c814ad28a Mon Sep 17 00:00:00 2001 From: Reese Wright Date: Mon, 2 Feb 2026 14:34:39 +0000 Subject: [PATCH 2/3] update CHANGELOG for audio export fix --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47e1dfd0..b7116d39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Audio export failing when Tauri save dialog returns object instead of string path + ### Added - **Makefile** - Comprehensive development workflow automation with commands for setup, development, building, testing, and code quality checks - Includes Python version detection and compatibility warnings From d40f7d2676b8558de14e6997d564328a10108e07 Mon Sep 17 00:00:00 2001 From: Reese Wright Date: Mon, 2 Feb 2026 14:54:05 +0000 Subject: [PATCH 3/3] refactor: improve path resolution readability --- tauri/src/platform/filesystem.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tauri/src/platform/filesystem.ts b/tauri/src/platform/filesystem.ts index fc5083b9..2292a99a 100644 --- a/tauri/src/platform/filesystem.ts +++ b/tauri/src/platform/filesystem.ts @@ -10,12 +10,12 @@ export const tauriFilesystem: PlatformFilesystem = { }); if (filePath) { - const resolvedPath = - typeof filePath === 'string' - ? filePath - : filePath && typeof filePath === 'object' && 'path' in filePath - ? (filePath as { path: string }).path - : ''; + let resolvedPath = ''; + if (typeof filePath === 'string') { + resolvedPath = filePath; + } else if (filePath && typeof filePath === 'object' && 'path' in filePath) { + resolvedPath = (filePath as { path: string }).path; + } if (!resolvedPath) { throw new Error('Failed to resolve save path');