at the very least fixes tgui?

This commit is contained in:
SandPoot
2024-03-12 21:37:22 -03:00
parent 7feb673279
commit e8f490154f
4 changed files with 26 additions and 3 deletions
+3 -2
View File
@@ -67,8 +67,6 @@ export const findCacheRoot = async () => {
const onCacheRootFound = cacheRoot => {
logger.log(`found cache at '${cacheRoot}'`);
// Plant a dummy
fs.closeSync(fs.openSync(cacheRoot + '/dummy', 'w'));
};
export const reloadByondCache = async bundleDir => {
@@ -93,6 +91,9 @@ export const reloadByondCache = async bundleDir => {
// Clear garbage
const garbage = await resolveGlob(cacheDir, './*.+(bundle|chunk|hot-update).*');
try {
// Plant a dummy browser window file, we'll be using this to avoid world topic
fs.closeSync(fs.openSync(cacheDir + '/dummy', 'w'));
for (let file of garbage) {
fs.unlinkSync(file);
}