mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
Fix wget with text file target
This commit is contained in:
parent
aa7facd4ba
commit
8fd4eee8e9
@ -1628,7 +1628,7 @@ export const ns: InternalAPI<NSFull> = {
|
|||||||
},
|
},
|
||||||
wget: (ctx) => async (_url, _target, _hostname) => {
|
wget: (ctx) => async (_url, _target, _hostname) => {
|
||||||
const url = helpers.string(ctx, "url", _url);
|
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 hostname = _hostname ? helpers.string(ctx, "hostname", _hostname) : ctx.workerScript.hostname;
|
||||||
const server = helpers.getServer(ctx, hostname);
|
const server = helpers.getServer(ctx, hostname);
|
||||||
if (!target || (!hasTextExtension(target) && !hasScriptExtension(target))) {
|
if (!target || (!hasTextExtension(target) && !hasScriptExtension(target))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user