tried to extract zip Archive which contains some links in mono on linux.
extract manually using unzip works in Linux Shell, I got following file:
lrwxrwxrwx 1 root root 8 Nov 7 18:40 ncurses.h -> curses.h
with a C# Code snippet:
using (var archive = new ZipArchive(InstallationFile))
{
var action = ActionOnExistingFiles.OverwriteAll;
archive.ExtractAll(DatabasePath, TransferMethod.Copy, action);
}
I got following exception on ExtractAll Method:
Rebex.IO.Compression.ZipException Link detected ('\/pgsql\/include\/ncurses\/ncurses.h'). Rebex.BatchProblemEventArgs HandleException(System.Exception, Rebex.IO.TransferProblemType, Rebex.TransferItem, Rebex.TransferItem, Rebex.BatchProblemReactions, Rebex.BatchProblemReactions, Rebex.BatchProblemReactions ByRef) at Rebex.BatchTransfer.HandleException (System.Exception ex, Rebex.IO.TransferProblemType type, Rebex.TransferItem remoteItem, Rebex.TransferItem localItem, Rebex.BatchProblemReactions defaultAction, Rebex.BatchProblemReactions possibleReactions, Rebex.BatchProblemReactions& chosenAction) [0x001b0] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.BatchTransfer.ProcessLink (Rebex.TraversalPathInfo info, Rebex.BatchProblemReactions possibleActions, Rebex.BatchProblemReactions& chosenAction) [0x0009d] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.BatchTransfer.ProcessPath (Rebex.TraversalPathInfo info) [0x00196] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.BatchTransfer.RetrieveHierarchy () [0x002a1] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.BatchTransfer.Transfer (Rebex.IO.TransferAction action, Rebex.BatchFileSetCollection sourceFilter, System.String targetPath, Rebex.IO.TransferMethod transferMethod, Rebex.IO.MoveMode moveMode, Rebex.IO.LinkProcessingMode actionOnLinks, Rebex.IO.ActionOnExistingFiles actionOnExistingFiles, Rebex.TransferItem expectedRootItem) [0x00227] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.IO.Compression.ZipBatchTransfer.Transfer (Rebex.IO.Compression.ArchiveOperation operation, Rebex.BatchFileSetCollection sourceFilter, System.String targetPath, Rebex.IO.TransferMethod transferMethod, Rebex.IO.ActionOnExistingFiles actionOnExistingFiles) [0x0002c] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.IO.Compression.ZipArchive.ExtractSync (Rebex.BatchFileSetCollection setCollection, System.String targetDirectoryPath, Rebex.IO.TransferMethod transferMethod, Rebex.IO.ActionOnExistingFiles actionOnExistingFiles) [0x0001a] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.IO.Compression.ZipArchive.Extract (System.String archivePathOrMask, System.String targetDirectoryPath, Rebex.IO.TraversalMode mode, Rebex.IO.TransferMethod transferMethod, Rebex.IO.ActionOnExistingFiles defaultActionOnExistingFiles, System.Boolean fromOldApi) [0x0001a] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.IO.Compression.ZipArchive.Extract (System.String archivePathOrMask, System.String targetDirectoryPath, Rebex.IO.TraversalMode mode, Rebex.IO.TransferMethod transferMethod, Rebex.IO.ActionOnExistingFiles defaultActionOnExistingFiles) [0x00001] in <89ad118348324dbfbe4b9279af8ac151>:0
at Rebex.IO.Compression.ZipArchive.ExtractAll (System.String targetDirectoryPath, Rebex.IO.TransferMethod transferMethod, Rebex.IO.ActionOnExistingFiles defaultActionOnExistingFiles) [0x0000d] in <89ad118348324dbfbe4b9279af8ac151>:0
How to fix?