synchronize scp and write

This commit is contained in:
Snarling
2022-08-17 18:55:12 -04:00
parent 95a1c18139
commit f6a8d5d337
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -839,7 +839,8 @@ const base: InternalAPI<NS> = {
throw helpers.makeRuntimeErrorMsg(ctx, "No scripts to copy");
}
let res = true;
scripts.map(function (script) {
scripts.forEach(function (script) {
//TODO: This array method still needs to be reworked because it is terribly inefficient.
if (!NetscriptFunctions(ctx.workerScript).scp(script, destination, source)) {
res = false;
}