Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: zip needs unix paths #94

Merged
merged 1 commit into from
Mar 26, 2024
Merged

fix: zip needs unix paths #94

merged 1 commit into from
Mar 26, 2024

Conversation

mistydemeo
Copy link
Contributor

ZIP expects unix-style paths here, and passing Windows paths will cause incorrect and broken files to be added to the directory.

The zip crate's start_file_from_path and add_directory_from_path normalize these, but they were deprecated without replacement so we need to do the work ourselves.

Fixes axodotdev/cargo-dist#873.

@mistydemeo mistydemeo requested a review from Gankra March 26, 2024 00:16
Copy link
Member

@Gankra Gankra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whack as hell, geez

ZIP expects unix-style paths here, and passing Windows paths will cause
incorrect and broken files to be added to the directory.

The `zip` crate's `start_file_from_path` and `add_directory_from_path` normalize
these, but they were deprecated without replacement so we need to do the work
ourselves.

Fixes axodotdev/cargo-dist#873.
@mistydemeo mistydemeo merged commit 480cd6a into main Mar 26, 2024
14 checks passed
@mistydemeo mistydemeo deleted the zip_unix_paths branch March 26, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo-dist include directive _may_ be having problems archiving subdirectories?
2 participants