mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
SharpCompress hangs when tar contains symbolic link and is not possible to create it #360
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @justalemon on GitHub (Aug 8, 2019).
I was currently working on one of my programs when I tried to extract a
.tar.xz(you can get it from here) and the WriteEntryToDirectory call ended up hanging on a specific file:Just to make sure that I didn't made a mistake on my code, I tried to extract the file with WinRAR and it warned me that it was not possible to create a symbolic link:
Maybe SharpCompress is not handling symbolic links errors correctly?
@justalemon commented on GitHub (Aug 8, 2019):
Looks like this is related to either Mono or WSL/Ubuntu. On Windows you get:
@adamhathcock commented on GitHub (Aug 20, 2019):
Anymore detail? Maybe this is a simple bug? I use a MacOS so I haven't tried to reproduce this.
@RealOrko commented on GitHub (May 21, 2020):
Just found the same thing using v0.25.0 on Fedora 31.
By settings up the options as follows it stopped throwing an exception:
After doing a little investigation it would seem there is no clear way of dealing with this in the DOTNET Runtime until this issue is solved.
@adamhathcock commented on GitHub (May 22, 2020):
Added default delegate in https://www.nuget.org/packages/sharpcompress/0.25.1
@RealOrko commented on GitHub (May 24, 2020):
@justalemon can you provide a specimen demonstrating the problem? I am currently using this library to download tars from all over github and have found it works across fedora 31/32 && ubuntu(bionic).
@RealOrko commented on GitHub (May 24, 2020):
@adamhathcock is there any appetite to add an implementation that delegates to the OS in the absence of https://github.com/dotnet/runtime/issues/24271?
@justalemon commented on GitHub (May 24, 2020):
@RealOrko I got the files from https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/ they contain entire Alpine distros using symbolic links.
@RealOrko commented on GitHub (May 24, 2020):
@justalemon I downloaded and unzipped image 2479, 2478 and 2477 without any issues on fedora 32.
I extracted the archive twice:
tar -xvf ./fx.tar.xz -C ./fxI then did a search for the symlink from your screen shot
./alpine/usr/share/terminfo/...but there wasn't any to be found in either of the extracted archives. Are you doing anything special to try and create the symlinks in your code? Once thing to try might be running your unzipping code through a console app without a GUI just to be sure that there is nothing in the UI that is blocking the unzipping process when it reports status.