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.
This commit is contained in:
Kacper
2025-12-14 00:20:58 +01:00
parent 10e647570b
commit 986f6c034f

View File

@@ -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);