From 986f6c034f224f330ed012346171637b29da4907 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 14 Dec 2025 00:20:58 +0100 Subject: [PATCH] feat: improve project path handling in InterviewView component - Updated the project path construction to use platform-specific path separators, enhancing compatibility across different operating systems. - Implemented a check for the Electron API to determine the appropriate path separator based on the user's platform. --- apps/app/src/components/views/interview-view.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/app/src/components/views/interview-view.tsx b/apps/app/src/components/views/interview-view.tsx index 78110faa..75007a8c 100644 --- a/apps/app/src/components/views/interview-view.tsx +++ b/apps/app/src/components/views/interview-view.tsx @@ -305,7 +305,10 @@ export function InterviewView() { try { const api = getElectronAPI(); - const fullProjectPath = `${projectPath}/${projectName}`; + // Use platform-specific path separator + const pathSep = typeof window !== 'undefined' && (window as any).electronAPI ? + (navigator.platform.indexOf('Win') !== -1 ? '\\' : '/') : '/'; + const fullProjectPath = `${projectPath}${pathSep}${projectName}`; // Create project directory await api.mkdir(fullProjectPath);