Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 15522c5

Browse files
committed
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.
1 parent 0c2ba26 commit 15522c5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mods/webv4-installer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ function download(url, target) {
2525

2626
function extract(file, target) {
2727
if (!file_isdir(install_dir)) {
28-
if (!mkdir(install_dir)) return false;
29-
}
30-
return system.exec('unzip -uqo ' + file + ' -d ' + target) == 0;
28+
if (!mkdir(install_dir)) return false;
29+
}
30+
const zp = system.platform.search(/^win/i) > -1 ? system.exec_dir : '';
31+
return system.exec(zp + 'unzip -uqo ' + file + ' -d ' + target) == 0;
3132
}
3233

3334
function update_sbbs_ini(root_directory, error_directory) {

0 commit comments

Comments
 (0)