use 'readTree' to parse data file

This commit is contained in:
codetypes committed 2025-03-18 10:58:17 +08:00
1 parent 7478e1fa0f
commit 4d1d09fe80
12 files changed
+60 -30

No files matched your search

+1 -2
View File
@@ -652,8 +652,7 @@ export const createTreeData = (
export const createBuildData = (path: string) => {
try {
const str = fs.readFileSync(path, "utf8");
const treeModel: TreeModel = JSON.parse(str);
const treeModel: TreeModel = readTree(path);
const data = createTreeData(treeModel.root);
refreshTreeDataId(data, treeModel.firstid ?? 1);
treeModel.name = Path.basenameWithoutExt(path);