From a2a2d6681f7354db7748149ef6dc6c6f8d6727eb Mon Sep 17 00:00:00 2001 From: laibo102 Date: Fri, 2 Sep 2022 14:47:40 +0800 Subject: [PATCH] Bugfix: fixed conflict Signed-off-by: laibo102 Change-Id: Iad018bae7e24c7432ea7dd71ab8871417fe9b6ca --- compiler/main.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/compiler/main.js b/compiler/main.js index 21f1ff1..d09b36a 100644 --- a/compiler/main.js +++ b/compiler/main.js @@ -403,19 +403,17 @@ function checkAppResourcePath(appResourcePath, config) { } function saveAppResourcePath(appResourcePath, appResourcePathSavePath) { - if (!projectConfig.xtsMode) { - let isSave = false; - if (fs.existsSync(appResourcePathSavePath)) { - const saveContent = fs.readFileSync(appResourcePathSavePath); - if (appResourcePath !== saveContent) { - isSave = true; - } - } else { + let isSave = false; + if (fs.existsSync(appResourcePathSavePath)) { + const saveContent = fs.readFileSync(appResourcePathSavePath); + if (appResourcePath !== saveContent) { isSave = true; } - if (isSave) { - fs.writeFileSync(appResourcePathSavePath, appResourcePath); - } + } else { + isSave = true; + } + if (isSave) { + fs.writeFileSync(appResourcePathSavePath, appResourcePath); } }