More hotfixes...

* Script editor theme could be corrupted leading to a recovery screen, this should fix that.
* Because script filepath changes were moved before the detection of .ns files, a check was added for .ns files in BaseServer so they get the better name.
This commit is contained in:
omuretsu
2023-05-30 20:00:15 -04:00
parent 1aa53739cc
commit b65bd62345
3 changed files with 21 additions and 15 deletions
+2
View File
@@ -333,6 +333,8 @@ export abstract class BaseServer implements IServer {
server.scripts = new JSONMap();
// In case somehow there are previously valid filenames that can't be sanitized, they will go in a new directory with a note.
for (const script of oldScripts) {
// We're about to do type validation on the filename anyway.
if (script.filename.endsWith(".ns")) script.filename = (script.filename + ".js") as any;
let newFilePath = resolveScriptFilePath(script.filename);
if (!newFilePath) {
newFilePath = `${newDirectory}script${++invalidScriptCount}.js` as ScriptFilePath;