fix(core): 修复nwjs下本地version读取异常
This commit is contained in:
@@ -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');
|
||||
@@ -103,8 +102,6 @@ function getLocalVersion() {
|
||||
}
|
||||
return '2025.09.06';
|
||||
}
|
||||
return 'None';
|
||||
}
|
||||
|
||||
function saveVersionInfo(version) {
|
||||
fs.writeFileSync(VERSION_FILE, version);
|
||||
|
||||
Reference in New Issue
Block a user