mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Fix TGUI Dev Server (#26334)
This commit is contained in:
@@ -6,10 +6,7 @@
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { require } from './require.js';
|
||||
|
||||
const globPkg = require('glob');
|
||||
import { globSync } from 'glob';
|
||||
|
||||
export const resolvePath = path.resolve;
|
||||
|
||||
@@ -17,10 +14,7 @@ export const resolvePath = path.resolve;
|
||||
* Combines path.resolve with glob patterns.
|
||||
*/
|
||||
export const resolveGlob = (...sections) => {
|
||||
const unsafePaths = globPkg.sync(path.resolve(...sections), {
|
||||
strict: false,
|
||||
silent: true,
|
||||
});
|
||||
const unsafePaths = globSync(path.resolve(...sections), { nodir: false, windowsPathsNoEscape: true });
|
||||
const safePaths = [];
|
||||
for (let path of unsafePaths) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user