diff --git a/src/common/utils/system.ts b/src/common/utils/system.ts index a0873b0a..63818422 100644 --- a/src/common/utils/system.ts +++ b/src/common/utils/system.ts @@ -4,9 +4,9 @@ import path from 'node:path'; // 缓解Win7设备兼容性问题 let osName: string; try { - osName = os.hostname(); + osName = os.hostname(); } catch (e) { - osName = "NapCat" + osName = 'NapCat ' + crypto.randomUUID().substring(0, 4); } export const systemPlatform = os.platform();