fix bug with ls() that prevented including .txt files

This commit is contained in:
Wraithan (Chris McDonald) 2018-02-10 12:19:08 -08:00
parent ff3f6da2d4
commit 6a3ac7165d

@ -816,6 +816,16 @@ function NetscriptFunctions(workerScript) {
} }
} }
for (var i = 0; i < server.textFiles.length; i++) {
if (filter) {
if (server.textFiles[i].fn.includes(filter)) {
allFiles.push(server.textFiles[i].fn);
}
} else {
allFiles.push(server.textFiles[i].fn);
}
}
//Sort the files alphabetically then print each //Sort the files alphabetically then print each
allFiles.sort(); allFiles.sort();
return allFiles; return allFiles;