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

Fails to extract hardlinks #51

Closed
hasufell opened this issue Mar 1, 2020 · 1 comment
Closed

Fails to extract hardlinks #51

hasufell opened this issue Mar 1, 2020 · 1 comment

Comments

@hasufell
Copy link
Member

hasufell commented Mar 1, 2020

Try to unpack https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-src.tar.xz which contains hardlinks:

  • ghc-8.6.5/libraries/bytestring/LICENSE -> ghc-8.6.5/libraries/bytestring/bench/LICENSE

emulateLinks = mapM_ $ \(relPath, relLinkTarget) ->
let absPath = baseDir </> relPath
absTarget = FilePath.Native.takeDirectory absPath </> relLinkTarget
in copyFile absTarget absPath

will receive:

"ghc-8.6.5/libraries/bytestring/LICENSE"       -- relPath
"ghc-8.6.5/libraries/bytestring/bench/LICENSE" -- relLinkTarget

And then concatenate to the path ghc-8.6.5/libraries/bytestring/ghc-8.6.5/libraries/bytestring/bench/LICENSE, which doesn't exist. So are hardlinks always "absolute" in the context of the tar root?

@Bodigrim
Copy link
Contributor

Seems to be fixed by #77.

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

No branches or pull requests

2 participants