Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Exception on a tar.gz file

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

    Hi.

    I’m getting the following exception when trying to extract a tar.gz file:

     Cannot convert value.
    Type: Xceed.GZip.GZippedFile
    FullName: ….

    Stack trace:

       at Xceed.Tar.TarredFolder..ctor(FileSystemEvents events, Object userData, AbstractFile tarFile, String folderName)
       at Xceed.Tar.TarArchive..ctor(FileSystemEvents events, Object userData, AbstractFile tarFile)
       at Xceed.Tar.TarArchive..ctor(AbstractFile tarFile)
       at TsmUtils.UtilsZip.Extract_TarGZ(String gzip_file, String target_dir) in C:\Documents and Settings\Eli.Gazit\My Documents\Visual Studio 2005\Projects\TsmCS.root\TsmCS\TsmUtils\UtilsZip.cs:line 151
       at TsmUtils.UtilsZip.Extract(String compressed_file, String target_dir) in C:\Documents and Settings\Eli.Gazit\My Documents\Visual Studio 2005\Projects\TsmCS.root\TsmCS\TsmUtils\UtilsZip.cs:line 68
       at TsmUtils.UtilsZip.Extract(String compressed_file, String target_dir) in C:\Documents and Settings\Eli.Gazit\My Documents\Visual Studio 2005\Projects\TsmCS.root\TsmCS\TsmUtils\UtilsZip.cs:line 75
       at TsmUtils.UtilsZip.Unzip(String compressedFilePath, String targetRootDirectory, IThreadCanceled threadCancel, CancelQuestionFormHandler cancelQuestionFormHandler) in C:\Documents and Settings\Eli.Gazit\My Documents\Visual Studio 2005\Projects\TsmCS.root\TsmCS\TsmUtils\UtilsZip.cs:line 47
       at TsmDL.ToolManager.Parse.ZipFilesParser.Parse_Zip(String file_name, String path) in C:\Documents and Settings\Eli.Gazit\My Documents\Visual Studio 2005\Projects\TsmCS.root\TsmCS\TsmDL\ToolManager\Parse\ZipFilesParser.cs:line 303

     

     

    The code used is from the Xceed examples:

    /// <summary>

    /// Extract tar.gz files

    /// </summary>

    /// <param name=”gzip_file”></param>

    /// <param name=”target_dir”></param>

    private static bool Extract_TarGZ(string gzip_file, string target_dir)

    {

    FileInfo gzipInfo = new FileInfo(gzip_file);

    // We’ll work with the tar.gz archive created in the previous topic.

    AbstractFile gzipFile = new DiskFolder(gzipInfo.DirectoryName).GetFile(gzipInfo.Name);

    //validate that source gzip file exists

    if (!File.Exists(gzip_file))

    return false;

    FileSystemEvents events = CreateFileSystemEvents();

    // Access the TAR file in that GZip archive.

    AbstractFile tarFile = new GZippedFile(gzipFile);

    // And that TAR’s contents as a folder.

    AbstractFolder archive = new TarArchive(tarFile);

    AbstractFolder dest = new DiskFolder(target_dir);

    archive.CopyFilesTo(events,

    null, dest, true, true);

    return true;

    }

     

    I’ve attaced the problematic zip file.

    The code works for other tar.gz files.

     I would like to send the file but it contains some company-related data, so I rather share it by email directly and not attach it here.

    Please advise.

    Thanks.

     

    Imported from legacy forums. Posted by Eli (had 3593 views)

    User (Old forums)
    Member
    Post count: 23064

    The exception message does not tell us enough to be able to tell what could be the issue.

    If you are entitle to support, you can send us the file to support@xceed.com, and we will have a look at it.  Make a link to this thread in the email please.

    Imported from legacy forums. Posted by André (had 2006 views)

    User (Old forums)
    Member
    Post count: 23064

    After investigating this further, we found that the groupID of all the files within the archive is corrupted, and the component throws on that.  However, we consider this a bug on our side, the component should ignore this error.

    We have filled a bug report, so that this can be corrected.  However, we can’t provide a time frame when the fix will become available.

     

    Imported from legacy forums. Posted by André (had 2989 views)

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