login about faq

I've been testing the new AddFile2() function with v.69 and found a significant bug which breaks this function.

Here is sample code to replicate:

$aFilesToAdd = array(
    'relative/path/to/file1',
    'relative/path/to/file2',
    'relative/path/to/file3'
);

foreach ( $aFilesToAdd as $sFilePath ) {
    // $sFullPathToFile = Code to build the full path to the file so CKTar can locate it.
    $oCKTar->AddFile2( $sFullPathToFile, $sFilePath );
}

After I write the tar file and then list the contents, this is what I get:

-rw-r--r-- 1000/1000   9426093 2017-10-08 18:46 relative/path/to/file1
-rw-r--r-- 1000/1000   1720726 2017-10-08 18:46 relative/path/to/file1relative/path/to/file2
-rw-r--r-- 1000/1000   2884056 2017-10-08 18:46 relative/path/to/file1relative/path/to/file2relative/path/to/file3

I hope the pattern here is clear. Basically the path for a file within the Tar is being written as the cumulative/concatenated path of all the file paths so far specified in the Tar.

Hope this helps to narrow down the bug. Much appreciated!

asked Oct 11 at 10:53

hostliketoast's gravatar image

hostliketoast
12

edited Oct 11 at 10:54


Thanks. I found the problem and made the fix. If you need a new build, please let me know the exact build (programming language, operating system, .NET Framework, Visual Studio version, Perl/Python/PHP version, etc.)

link

answered Oct 11 at 11:02

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

Brilliant. Happy to test it on: PHP Extension v5.6, CentOS x64

Would this new build be limited to v.69 + your fix?

(Oct 11 at 11:06) hostliketoast

Getting the new build will take a bit longer than the fix. I'll try to get that sometime today..

The new build is the .70 pre-release. The updates/fixes made so far are listed at http://cknotes.com/chilkat-v9-5-0-70-pre-release-notes/

(Oct 11 at 11:09) chilkat ♦♦

Gotcha, no problem and no rush!

(Oct 11 at 11:12) hostliketoast
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:

×19
×11

Asked: Oct 11 at 10:53

Seen: 136 times

Last updated: Oct 11 at 18:58

powered by OSQA