diff --git a/bin/unzip b/bin/unzip new file mode 100755 index 0000000..581ff8e Binary files /dev/null and b/bin/unzip differ diff --git a/models/problem.js b/models/problem.js index 1e6a32f..bafd72b 100644 --- a/models/problem.js +++ b/models/problem.js @@ -340,7 +340,8 @@ class Problem extends Model { await fs.remove(dir); await fs.ensureDir(dir); - await p7zip.extract(path, dir); + let execFileAsync = Promise.promisify(require('child_process').execFile); + await execFileAsync(__dirname + '/../bin/unzip', ['-j', '-o', '-d', dir, path]); await fs.move(path, this.getTestdataArchivePath(), { overwrite: true }); }); }