snoyberg / tar-conduit

Conduit based tar extraction mechanism
MIT License
8 stars 9 forks source link

Added support for hard links #20

Closed gaborh-da closed 5 years ago

gaborh-da commented 6 years ago

This patch adds support for hard links by enabling FTHardLink to hold a "linkname" (path of a linked file). The patch also implements hard link handler logic for Unix (Windows only support hard links in special operation modes.). restoreFileInto was also modified to prepend the supplied target directory to all the hard links (note that a hard link cannot be relative).

gaborh-da commented 5 years ago

@snoyberg please look at it, if you have some time. :)

ndmitchell commented 5 years ago

FWIW, I reviewed this patch and it looks reasonable to me.

snoyberg commented 5 years ago

I think it's OK, but @lehins is probably better equipped to review than me.

lehins commented 5 years ago

@gaborh-da Sorry for the trouble, but your recent ticket spawned of a small initiative on my part to introduce lenient tar restoration, which is now in master. But that caused some conflicts to this PR.

I'll also leave separate comments to the current implementation.

gaborh-da commented 5 years ago

@lehins could you please have final look? :)

lehins commented 5 years ago

@gaborh-da Looks great. You can ignore AppVeyor failure, it's a Windows specific bug in older ghc-pkg.

I'll merge it into master and make a release in just a little bit.