NTNU-IHB / FMI4cpp

FMI 2.0 implementation written in modern C++.
MIT License
96 stars 36 forks source link

Make unzipper compliant with unordered files/directories creation #95

Closed KBaluev closed 4 years ago

KBaluev commented 4 years ago

In case the FMU ZIP file tree doesn't have a directory entry for the file to be placed in the mentioned directory or the files/directories entries are out of order, the directory needs to be created for such a file.

markaren commented 4 years ago

containingDirectory == tmp_path which is passed in to the function. unzip expects that this folder already exists (this is done by fmu.cpp internally).

Not sure if this change is required.. Could you elaborate on what error you encountered?

markaren commented 4 years ago

containingDirectory == tmp_path

This might not be true..

So the error happens if the unzipper encounters e.g. a afile.txt located in resources, but resources has yet to be created?

KBaluev commented 4 years ago

containingDirectory == tmp_path

This might not be true..

So the error happens if the unzipper encounters e.g. a afile.txt located in resources, but resources has yet to be created?

Exactly this situation. I have encountered this behavior while creating an FMU manually via Win10 ZIP driver and also using the fmusdk (https://github.com/qtronic/fmusdk) example outputs.