Merge pull request #16078 from SandPoot/tgui-dev-fix
Fix tgui dev server on Windows
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { require } from './require.js';
|
||||
|
||||
const globPkg = require('glob');
|
||||
@@ -19,14 +20,14 @@ export const resolveGlob = (...sections) => {
|
||||
const unsafePaths = globPkg.sync(path.resolve(...sections), {
|
||||
strict: false,
|
||||
silent: true,
|
||||
windowsPathsNoEscape: true,
|
||||
});
|
||||
const safePaths = [];
|
||||
for (let path of unsafePaths) {
|
||||
try {
|
||||
fs.statSync(path);
|
||||
safePaths.push(path);
|
||||
}
|
||||
catch {}
|
||||
} catch {}
|
||||
}
|
||||
return safePaths;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user