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!