Program path bugfix + wget use contentFile

This commit is contained in:
Snarling
2023-04-28 11:42:35 -04:00
parent 8fd4eee8e9
commit 350679bc83
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -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 */