From 15522c56d8c75e0b61604c7539c8bff82d456df7 Mon Sep 17 00:00:00 2001 From: echicken <echicken@bbs.electronicchicken.com> Date: Wed, 3 Oct 2018 11:19:20 -0400 Subject: [PATCH] If on an MS-DOS computer, run pkunzip.exe from the system exec directory, elsewise just make assumtion that pkunzip.zip is on the PATH somewheres, and then unzip it, and then run it. Most of this commit message is wildly inaccurate. --- mods/webv4-installer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mods/webv4-installer.js b/mods/webv4-installer.js index 3612e0c..c35a166 100644 --- a/mods/webv4-installer.js +++ b/mods/webv4-installer.js @@ -25,9 +25,10 @@ function download(url, target) { function extract(file, target) { if (!file_isdir(install_dir)) { - if (!mkdir(install_dir)) return false; - } - return system.exec('unzip -uqo ' + file + ' -d ' + target) == 0; + if (!mkdir(install_dir)) return false; + } + const zp = system.platform.search(/^win/i) > -1 ? system.exec_dir : ''; + return system.exec(zp + 'unzip -uqo ' + file + ' -d ' + target) == 0; } function update_sbbs_ini(root_directory, error_directory) { -- GitLab