Bugfix: fixed conflict

Signed-off-by: laibo102 <laibo2@huawei.com>
Change-Id: Iad018bae7e24c7432ea7dd71ab8871417fe9b6ca
This commit is contained in:
laibo102
2022-09-02 14:47:40 +08:00
parent 7e1c6f8a1e
commit a2a2d6681f
+9 -11
View File
@@ -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);
}
}