-
Notifications
You must be signed in to change notification settings - Fork 193
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
entry: convert hard link absolute paths to relative ones #248
base: main
Are you sure you want to change the base?
Conversation
Looks good to me! I think tests may be failing now though :( |
All tests are passing here (Linux) and I don't have access to a macos system to debug this I'm afraid. :\ |
I got access to a macos box from a colleague. Here is the problem:
As you can see |
Sorry I'm not sure, I've never seen this behavior before. |
Sorry I got confused while debugging. The actual issue is test's I solved it by canonicalizing the tempdir as well. |
I think windows may now be failing? |
When unpacking a docker image, some hard links may be pointing to, say, /bin/gunzip. Those were failing the validate_inside_dst() check, preventing to unpack the image. Fix this by re-using the same logic as we are already using for actual files, removing the leading '/' from the link target path. We do this only if the absolute link is not an ancestor of the target dir as we want to support this use case according to the existing absolute_hardlink() test.
god, working with paths isn't fun on Windows. |
That's really strange, the test is passing on my Windows box so I'm afraid there is not much more I can do. :\ |
When unpacking a docker image, some hard links may be pointing to, say,
/bin/gunzip. Those were failing the validate_inside_dst() check,
preventing to unpack the image.
Fix this by re-using the same logic as we are already using for actual
files, removing the leading '/' from the link target path.
We do this only if the absolute link is not an ancestor of the target
dir as we want to support this use case according to the existing
absolute_hardlink() test.