Unverified 提交 c3362fda authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Normalize app files (#547)

上级 08a38675
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论