cool, now i **have** to fix the master branch. ree
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
/**
|
||||
* @file
|
||||
* @copyright 2020 Aleksej Komarov
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { createLogger } from 'common/logging.js';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import { basename } from 'path';
|
||||
import { promisify } from 'util';
|
||||
import { resolveGlob, resolvePath } from './util.js';
|
||||
import { regQuery } from './winreg.js';
|
||||
|
||||
const logger = createLogger('reloader');
|
||||
|
||||
@@ -40,6 +47,21 @@ export const findCacheRoot = async () => {
|
||||
return cacheRoot;
|
||||
}
|
||||
}
|
||||
// Query the Windows Registry
|
||||
if (process.platform === 'win32') {
|
||||
logger.log('querying windows registry');
|
||||
let userpath = await regQuery(
|
||||
'HKCU\\Software\\Dantom\\BYOND',
|
||||
'userpath');
|
||||
if (userpath) {
|
||||
cacheRoot = userpath
|
||||
.replace(/\\$/, '')
|
||||
.replace(/\\/g, '/')
|
||||
+ '/cache';
|
||||
logger.log(`found cache at '${cacheRoot}'`);
|
||||
return cacheRoot;
|
||||
}
|
||||
}
|
||||
logger.log('found no cache directories');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user