Fixed checking path for unzip output...

This commit is contained in:
BurnyLlama 2021-11-02 09:58:10 +01:00
parent 06fcfb65ac
commit c3b09f96c9

View File

@ -67,7 +67,7 @@ export function downloadEssentialData() {
exec(
`unzip -o ${process.env.DDNET_SQLITE_PATH ? `${process.env.DDNET_SQLITE_PATH}.zip` : 'data/ddnet.sqlite.zip'} \
-d ${process.env.DDNET_SQLITE_PATH.replace(/\/[\s\S]*\.sqlite/, "") ?? 'data'}`,
-d ${process.env.DDNET_SQLITE_PATH ? process.env.DDNET_SQLITE_PATH.replace(/\/[\s\S]*\.sqlite/, "") : 'data'}`,
err => {
if (err) {
log("Error while unzipping!")