jaemk / self_update

Self updates for rust executables
MIT License
796 stars 69 forks source link

Fix io error when extracing zip archive containing folders #68

Closed t-mw closed 3 years ago

t-mw commented 3 years ago

If a binary is contained in a folder in a zip archive (i.e. bin_path_in_archive has a prefix), extracting will fail with an io error "No such file or directory", because fs::File::create in Extract::extract_into and Extract::extract_path is passed the path of the binary including the zipped parent folder, which does not exist yet.

The commit adds tests for these cases and cleans up some existing tests.

jaemk commented 3 years ago

released in 0.25.0