Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET extract spanned zip file error

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

    Could not find a local header where one was expected in the zip file.

    what is this error?
    what have i done wrong in the zip file creation?

    or in the zip file extraction?

    there were no errors while i was zipping the files, it occured during extraction.

    Imported from legacy forums. Posted by schizo (had 4268 views)

    User (Old forums)
    Member
    Post count: 23064

    if the file that i am trying to extract is not spanned or not divided in multiple zip files, i get no error. but when i try to extract a spanned zip file or zip.zip, zip.z01, zip.z02 files.

    i just use the zip.zip right?
    but i get the error “Could not find a local header where one was expected in the zip file.”

    please, need help…

    Imported from legacy forums. Posted by schizo (had 358 views)

    User (Old forums)
    Member
    Post count: 23064

    on building the zip file, where should i palce the allowspanning property, before the beginupdate method or after?

    Imported from legacy forums. Posted by schizo (had 418 views)

    User (Old forums)
    Member
    Post count: 23064

    nowi know that the error is not in the zip file but in the extraction itself coz i tried to unzip the spanned zip file using winzip, and it worked.

    are there any additional codes or properties that i should set if the file is spanned?

    Imported from legacy forums. Posted by schizo (had 519 views)

    User (Old forums)
    Member
    Post count: 23064

    here is my unzip files code…

    public void UnzipFiles(string Destination, ref long copiedFiles)
    {
    Xceed.Zip.Licenser.LicenseKey = “ZIN20-XXXXX-XXXXX-XXXX”;
    DiskFolder DestFolder = new DiskFolder(Destination);
    AbstractFolder SubDestFolder;

    OpenZipFile(zipFileName);

    m_zipEvents.DiskRequired += new DiskRequiredEventHandler( m_zipEvents_DiskRequired );
    m_zipEvents.ByteProgression += new ByteProgressionEventHandler( m_zipEvents_ByteProgression );

    if( m_zipRoot != null )
    {
    try
    {
    //AbstractFile[] Files = m_zipRoot.GetFiles(m_zipEvents, null, true);
    AbstractFile[] Files = m_zipRoot.GetFiles(true);
    m_zipRoot.AllowSpanning = true;
    foreach( AbstractFile File in Files )
    {
    try
    {
    zipCounter.IncrementCounter();
    copiedFiles = zipCounter.zipCount;
    if( File.ParentFolder.IsRoot )
    {
    //File.CopyTo(m_zipEvents, null, DestFolder, false);
    File.CopyTo(DestFolder, true);
    }
    else
    {
    SubDestFolder = DestFolder.GetFolder( File.ParentFolder.FullName.Substring( 1 ) );
    if( !SubDestFolder.Exists )
    {
    SubDestFolder.Create();
    }
    File.CopyTo(m_zipEvents, null, SubDestFolder, false);
    //File.CopyTo(DestFolder, true);
    }
    }
    catch (Exception ex)
    {
    Utils.LogMessage(“Extract Error: ” + DestFolder.ToString() + File.ToString());
    Utils.LogMessage(“Details: ” + ex.Message.ToString());
    }
    }
    }
    catch( Exception Except )
    {
    Utils.LogMessage(“Extract Error: ” + Except.Message);
    }
    }
    else
    Console.Out.WriteLine(“Server Error: Zip file not initialized”);
    }

    Imported from legacy forums. Posted by schizo (had 5019 views)

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