login about faq

Event though I’ve set the .MustMatch, all files contained in the tar file coming before the file I want is also extracted. Please help

                tar.SuppressOutput = true;
                tar.UntarFromDir = tempPath;
                tar.NoAbsolutePaths = true;
                tar.MustMatch = sourceFileName;
                tar.UntarMatchPattern = sourceFileName;
                //tar.UntarMaxCount = 1;
                tar.UntarDiscardPaths = true;
                int fileCount = tar.Untar(XbkFileName);
                if (fileCount < 0)
                    extractResult = tar.LastErrorText;

asked Sep 22 '15 at 16:21

benneharli's gravatar image


Please turn on VerboseLogging (tar.VerboseLogging = true) and then post the contents of the tar.LastErrorText after calling Untar. (I realize that Untar was success -- the LastErrorText always contains information regardless of success/failure.)


answered Sep 23 '15 at 08:21

chilkat's gravatar image

chilkat ♦♦

I'm in contact with Matt/support and will take it there


answered Sep 23 '15 at 08:53

benneharli's gravatar image


Thanks. Setting the SuppressOutput = true caused the must-match pattern to be ignored (because nothing would be extracted anyway). However, the fileCount was incremented without regard to the match patterns. (There was no danger in extracting files that did not match. It was only the returned fileCount that was incorrect. It was counting all files for the case when SuppressOutput is true.)

I will provide a fix in private email.


answered Sep 23 '15 at 09:56

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 22 '15 at 16:21

Seen: 1,229 times

Last updated: Sep 23 '15 at 09:56

powered by OSQA