Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Exception opening Zip file containing "long path" entries

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20377 |

    I’m using Zip.Net and Realtime Zip 4.0.  Using the realtime zip I am zipping multiple files that have long absolute paths (i.e., greater than 255 chars) into an archive. This is not an issue and everything goes well. The issue arises when I try to open the resulting zip file using:

    ZipArchive za = new ZipArchive(new DiskFile(“myzip.zip”));

    On this line it throws: Xceed.Zip.ZipIOException: “An IO exception occurred while reading from or writing to the zip file.”

    The exception is thrown only on zip archives that contain files with long absolute paths. I am able to open and extract the contents of these zip files that have entries with long paths with no problem using the latest 7-zip. Looking at the zip file with a hex editor reveals that the ASCII and Unicode versions of the file names are intact and everything looks normal.

    This seems to be a bug. Does a newer release of Xceed Zip address this issue? 

    Thanks,

    -Steve 

    Imported from legacy forums. Posted by Steve (had 1077 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Steve, 
     
    This is a known issue, the limit is imposed by the .NET platform itself. There is nothing we can do about this for now.
    The component uses the System.IO.FileInfo class to perform its file operations.

    “On Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.”
    Source:
    http://msdn.microsoft.com/en-us/library/system.io.fileinfo.fileinfo.aspx

     
    So It only works with Real-Time Zip because that component deals directly with streams.
     

    Imported from legacy forums. Posted by Michel [Xceed] (had 1380 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.