diff --git a/ccw/src/core/routes/hooks-routes.ts b/ccw/src/core/routes/hooks-routes.ts index a3175bdb..c316c5f9 100644 --- a/ccw/src/core/routes/hooks-routes.ts +++ b/ccw/src/core/routes/hooks-routes.ts @@ -31,8 +31,8 @@ const GLOBAL_SETTINGS_PATH = join(homedir(), '.claude', 'settings.json'); * @returns {string} */ function getProjectSettingsPath(projectPath) { - const normalizedPath = projectPath.replace(/\//g, '\\').replace(/^\\([a-zA-Z])\\/, '$1:\\'); - return join(normalizedPath, '.claude', 'settings.json'); + // path.join automatically handles cross-platform path separators + return join(projectPath, '.claude', 'settings.json'); } /** diff --git a/ccw/src/core/routes/mcp-routes.ts b/ccw/src/core/routes/mcp-routes.ts index 343cfa0e..b9164ec1 100644 --- a/ccw/src/core/routes/mcp-routes.ts +++ b/ccw/src/core/routes/mcp-routes.ts @@ -1000,8 +1000,8 @@ function writeSettingsFile(filePath, settings) { * @returns {string} */ function getProjectSettingsPath(projectPath) { - const normalizedPath = projectPath.replace(/\//g, '\\').replace(/^\\([a-zA-Z])\\/, '$1:\\'); - return join(normalizedPath, '.claude', 'settings.json'); + // path.join automatically handles cross-platform path separators + return join(projectPath, '.claude', 'settings.json'); } // ========================================