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

benneharli
1


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.)

link

answered Sep 23 '15 at 08:21

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

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

link

answered Sep 23 '15 at 08:53

benneharli's gravatar image

benneharli
1

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.

link

answered Sep 23 '15 at 09:56

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×17
×3

Asked: Sep 22 '15 at 16:21

Seen: 600 times

Last updated: Sep 23 '15 at 09:56

powered by OSQA