From 8fd4eee8e9d08cb0fe1c23b10452fe80f89bb38c Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:14:29 -0400 Subject: [PATCH] Fix wget with text file target --- src/NetscriptFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index f3e5d11ed..ffae723fa 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1628,7 +1628,7 @@ export const ns: InternalAPI = { }, wget: (ctx) => async (_url, _target, _hostname) => { const url = helpers.string(ctx, "url", _url); - const target = helpers.scriptPath(ctx, "target", _target); + const target = helpers.filePath(ctx, "target", _target); const hostname = _hostname ? helpers.string(ctx, "hostname", _hostname) : ctx.workerScript.hostname; const server = helpers.getServer(ctx, hostname); if (!target || (!hasTextExtension(target) && !hasScriptExtension(target))) {