Skip to content

Fails to extract hardlinks #51

Closed
Closed

Description

@hasufell

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?

Activity

  1. Bodigrim commented on Nov 19, 2023

    @Bodigrim
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions