Lodestone-Team / lodestone_core

The backend for Lodestone, A free, open source server hosting tool for Minecraft and other multiplayers
https://www.lodestone.cc/
GNU Affero General Public License v3.0
60 stars 7 forks source link

Failed to unzip: Destination is not a directory #121

Closed RobinVanCauter closed 1 year ago

RobinVanCauter commented 1 year ago

After uploading a zip file and trying to unarchive this file, I get the following error: image

Diving a bit deeper, it looks like the current API expects the client to pass in the target directory in which the extracted files will be placed and upon receiving the request checks if that directory actually exists.

Looking at the request being sent out, an odd target directory seems to be passed to the API, after decoding the base64 I get the following: .\Create-generated-1 when trying to unarchive a file in the root folder called .\Create-generated.zip.

When I manually create this directory, the target directory requested by the client changes to .\Create-generated-2.

Personally, whenever I'm using a ZIP file, I'm usually trying to setup a modpack or restore from a backup, so I'd like the files inside the archive to be extracted inside the folder the archive is sitting in (./). Ofcourse having an option in the future to change the target folder sounds great, but the working directory would make for a sane default that would probably resolve this issue quite quick.

CheatCod commented 1 year ago

We are overhauling the unzip logic here, this issue should be fixed in 0.4.3