mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
Program path bugfix + wget use contentFile
This commit is contained in:
@@ -9,7 +9,7 @@ export type ProgramFilePath = FilePath & WithProgramExtension;
|
||||
export function hasProgramExtension(path: string): path is WithProgramExtension {
|
||||
if (path.endsWith(".exe")) return true;
|
||||
const extension = path.substring(path.indexOf("."));
|
||||
return /^\.exe-[0-9]{1-2}\.[0-9]{2}%-INC$/.test(extension);
|
||||
return /^\.exe-[0-9]{1,2}\.[0-9]{2}%-INC$/.test(extension);
|
||||
}
|
||||
|
||||
/** Sanitize a player input, resolve any relative paths, and for imports add the correct extension if missing */
|
||||
|
||||
Reference in New Issue
Block a user