Fix toLowercase in fileExists check for literature and message files

fixes #2245
This commit is contained in:
TheMas3212 2022-01-09 06:11:42 +11:00
parent d2193e017d
commit 446810d98f
No known key found for this signature in database
GPG Key ID: 62A173A4FDA683CA
2 changed files with 1 additions and 4 deletions

@ -1575,7 +1575,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
}
}
for (let i = 0; i < server.messages.length; ++i) {
if (filename.toLowerCase() === server.messages[i]) {
if (filename.toLowerCase() === server.messages[i].toLowerCase()) {
return true;
}
}

@ -58,9 +58,6 @@ export class BaseServer {
maxRam = 0;
// Message files AND Literature files on this Server
// For Literature files, this array contains only the filename (string)
// For Messages, it contains the actual Message object
// TODO Separate literature files into its own property
messages: string[] = [];
// Name of company/faction/etc. that this server belongs to.