From c3362fdaffd64ee5ff79d6f5157afe753486192e Mon Sep 17 00:00:00 2001 From: Will Chen Date: Wed, 2 Jul 2025 16:51:26 -0700 Subject: [PATCH] Normalize app files (#547) --- src/ipc/handlers/app_handlers.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ipc/handlers/app_handlers.ts b/src/ipc/handlers/app_handlers.ts index e6097d4..7938d2d 100644 --- a/src/ipc/handlers/app_handlers.ts +++ b/src/ipc/handlers/app_handlers.ts @@ -40,6 +40,7 @@ import { Worker } from "worker_threads"; import { createFromTemplate } from "./createFromTemplate"; import { gitCommit } from "../utils/git_utils"; import { safeSend } from "../utils/safe_sender"; +import { normalizePath } from "../processors/normalizePath"; async function copyDir( source: string, @@ -345,6 +346,9 @@ export function registerAppHandlers() { try { files = getFilesRecursively(appPath, appPath); + // Normalize the path to use forward slashes so file tree (UI) + // can parse it more consistently across platforms. + files = files.map((path) => normalizePath(path)); } catch (error) { logger.error(`Error reading files for app ${appId}:`, error); // Return app even if files couldn't be read