mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
Fix a few other bugs
This commit is contained in:
parent
4de20f8cce
commit
4b8e63f342
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -2149,11 +2149,15 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
return port.write(data);
|
||||
} else if (isString(port)) { // Write to script or text file
|
||||
const fn = removeLeadingSlash(port);
|
||||
let fn = port;
|
||||
if (!isValidFilePath(fn)) {
|
||||
throw makeRuntimeErrorMsg("write", `Invalid filepath: ${fn}`);
|
||||
}
|
||||
|
||||
if(fn.lastIndexOf("/") === 0) {
|
||||
fn = removeLeadingSlash(fn);
|
||||
}
|
||||
|
||||
// Coerce 'data' to be a string
|
||||
try {
|
||||
data = String(data);
|
||||
|
@ -94,7 +94,8 @@ function ScriptLogPopup(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
export function logBoxCreate(script: RunningScript): void {
|
||||
const id = script.filename+script.args.map((x: any): string => `${x}`).join('');
|
||||
const id = script.server+"-"+script.filename+script.args.map((x: any): string => `${x}`).join('-');
|
||||
if(document.getElementById(id) !== null) return;
|
||||
const container = createElement("div", {
|
||||
class: "log-box-container",
|
||||
id: id,
|
||||
|
Loading…
Reference in New Issue
Block a user