fix(core): 修复nwjs下本地version读取异常

This commit is contained in:
王立帮
2025-09-30 13:42:15 +08:00
parent 757f0f29ac
commit b3329fcb42

View File

@@ -92,7 +92,6 @@ const TEMP_FOLDER_PATH = path.resolve(__dirname, '../temp');;
const VERSION_FILE = path.resolve(__dirname, '../version.json');
function getLocalVersion() {
if(fs.existsSync(TEMP_FOLDER_PATH)) {
try {
if (fs.existsSync(VERSION_FILE)) {
const data = fs.readFileSync(VERSION_FILE, 'utf8');
@@ -102,8 +101,6 @@ function getLocalVersion() {
console.error('读取版本文件失败:', error);
}
return '2025.09.06';
}
return 'None';
}
function saveVersionInfo(version) {