From 1408ad652a496c10d0cee5fbe4cf27bab94e8bec Mon Sep 17 00:00:00 2001 From: sudacode Date: Sat, 28 Mar 2026 00:00:49 -0700 Subject: [PATCH] fix(ci): normalize Windows shortcut paths for cross-platform tests --- src/main/runtime/windows-mpv-shortcuts.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/runtime/windows-mpv-shortcuts.ts b/src/main/runtime/windows-mpv-shortcuts.ts index 09dcec8..013885c 100644 --- a/src/main/runtime/windows-mpv-shortcuts.ts +++ b/src/main/runtime/windows-mpv-shortcuts.ts @@ -24,7 +24,7 @@ export interface WindowsMpvShortcutInstallResult { } export function resolveWindowsStartMenuProgramsDir(appDataDir: string): string { - return path.join(appDataDir, 'Microsoft', 'Windows', 'Start Menu', 'Programs'); + return path.win32.join(appDataDir, 'Microsoft', 'Windows', 'Start Menu', 'Programs'); } export function resolveWindowsMpvShortcutPaths(options: { @@ -32,11 +32,11 @@ export function resolveWindowsMpvShortcutPaths(options: { desktopDir: string; }): WindowsMpvShortcutPaths { return { - startMenuPath: path.join( + startMenuPath: path.win32.join( resolveWindowsStartMenuProgramsDir(options.appDataDir), WINDOWS_MPV_SHORTCUT_NAME, ), - desktopPath: path.join(options.desktopDir, WINDOWS_MPV_SHORTCUT_NAME), + desktopPath: path.win32.join(options.desktopDir, WINDOWS_MPV_SHORTCUT_NAME), }; } @@ -54,7 +54,7 @@ export function buildWindowsMpvShortcutDetails(exePath: string): WindowsShortcut return { target: exePath, args: '--launch-mpv', - cwd: path.dirname(exePath), + cwd: path.win32.dirname(exePath), description: 'Launch mpv with the SubMiner profile', icon: exePath, iconIndex: 0, @@ -79,7 +79,7 @@ export function applyWindowsMpvShortcuts(options: { const failures: string[] = []; const ensureShortcut = (shortcutPath: string): void => { - mkdirSync(path.dirname(shortcutPath), { recursive: true }); + mkdirSync(path.win32.dirname(shortcutPath), { recursive: true }); const ok = options.writeShortcutLink(shortcutPath, 'replace', details); if (!ok) { failures.push(shortcutPath);