Skip to content

rustc_back: Only use archive member filenames #25238

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

Merged
merged 1 commit into from
May 14, 2015

Conversation

alexcrichton
Copy link
Member

I've been working with some archives generated by MSVC's lib.exe tool lately,
and it looks like the embedded name of the members in those archives sometimes
have slahes in the name (e.g. foo/bar/baz.obj). Currently the compiler chokes
on these paths as it assumes that each file in the archive is only the filename
(which is what unix does).

This commit interprets the name of each file in all archives as a path and then
only uses the file_name portion of the path to extract the file to a separate
location and then reassemble it back into a new archive later. Note that
duplicate filenames are already handled, so this won't introduce any conflicts.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented May 12, 2015

Can you add a comment explaining? This knowledge is easy to lose.

I've been working with some archives generated by MSVC's `lib.exe` tool lately,
and it looks like the embedded name of the members in those archives sometimes
have slahes in the name (e.g. `foo/bar/baz.obj`). Currently the compiler chokes
on these paths as it assumes that each file in the archive is only the filename
(which is what unix does).

This commit interprets the name of each file in all archives as a path and then
only uses the `file_name` portion of the path to extract the file to a separate
location and then reassemble it back into a new archive later. Note that
duplicate filenames are already handled, so this won't introduce any conflicts.
@alexcrichton alexcrichton force-pushed the fix-archive-with-slashes branch from 52c6a94 to f1ab664 Compare May 12, 2015 18:07
@alexcrichton
Copy link
Member Author

Ah of course! re-r?

@brson
Copy link
Contributor

brson commented May 13, 2015

@bors: r+

@bors
Copy link
Collaborator

bors commented May 13, 2015

📌 Commit f1ab664 has been approved by brson

@bors
Copy link
Collaborator

bors commented May 14, 2015

⌛ Testing commit f1ab664 with merge e77b03d...

bors added a commit that referenced this pull request May 14, 2015
I've been working with some archives generated by MSVC's `lib.exe` tool lately,
and it looks like the embedded name of the members in those archives sometimes
have slahes in the name (e.g. `foo/bar/baz.obj`). Currently the compiler chokes
on these paths as it assumes that each file in the archive is only the filename
(which is what unix does).

This commit interprets the name of each file in all archives as a path and then
only uses the `file_name` portion of the path to extract the file to a separate
location and then reassemble it back into a new archive later. Note that
duplicate filenames are already handled, so this won't introduce any conflicts.
@bors bors merged commit f1ab664 into rust-lang:master May 14, 2015
@alexcrichton alexcrichton deleted the fix-archive-with-slashes branch July 10, 2015 22:32
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.

4 participants