From 568332d41d41d71529f01419562dd5e572d512d1 Mon Sep 17 00:00:00 2001 From: "J.T. Sage" Date: Thu, 27 Oct 2022 11:17:08 -0400 Subject: [PATCH] Rework collection cleanName, redo debug flags to be safer, bump to 0.9.100 --- modAssist_main.js | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modAssist_main.js b/modAssist_main.js index 3b9f8b51..297eed3b 100644 --- a/modAssist_main.js +++ b/modAssist_main.js @@ -17,12 +17,10 @@ const { ma_logger } = require('./lib/ma-logger.js') const mcDetail = require('./package.json') const log = new ma_logger('modAssist', app, 'assist.log', gotTheLock) -let devDebug = false -let skipCache = false +const devDebug = !(app.isPackaged) +const skipCache = false && !(app.isPackaged) let updaterInterval = null -if ( app.isPackaged ) { devDebug = false; skipCache = false } - log.log.info(`ModAssist Logger: ${mcDetail.version}`) if ( process.platform === 'win32' && app.isPackaged && gotTheLock ) { @@ -958,7 +956,8 @@ function processModFolders_post(newFolder = false) { mcStore.set('modFolders', Array.from(modFolders)) modFolders.forEach((folder) => { - const cleanName = folder.replaceAll('\\', '-').replaceAll(':', '').replaceAll(' ', '_') + const cleanName = `col_${crypto.createHash('md5').update(folder).digest('hex')}` + //const cleanName = folder.replaceAll('\\', '-').replaceAll(':', '').replace(/[^\w-]/gi, '_') const shortName = path.basename(folder) const localStore = maCache.store diff --git a/package.json b/package.json index 380d508f..a1b3f1c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fsg-mod-assistant", - "version": "0.9.99", + "version": "0.9.100", "description": "FSG Farm Sim Mod Assistant", "main": "modAssist_main.js", "homepage": "https://github.com/FSGModding/FSG_Mod_Assistant#readme",