Home » File Formats » Archive_Tar » Bug #8702
Directory case not obeyed / preserved
Details
| Submitted | 2006-09-14 15:45 UTC |
|---|---|
| From | tim at skypanther dot com |
| Status | Bogus |
| Package | Archive_Tar |
| PHP Version | Irrelevant |
| OS | Various *nix |
| Roadmaps | (Not assigned) |
Comments
[2006-09-14 15:45 UTC] tim at skypanther dot com
Description:
------------
Let's say you have two directories: dir1 and Dir1. In the resulting tar file, the contents of these two directories are merged into a single directory.
(The same problem exists in the Zip package.)
Test script:
---------------
require_once('PEAR.php');
require_once('Tar.php');
$zip = new Archive_Tar( 'testfile.gz', 'gz');
// these files/dirs are created manually on the web server
$fileArray[] = 'test.txt';
$fileArray[] = 'test'; // should contain a unique file
$fileArray[] = 'Test'; // also should contain a file
$zip->add($fileArray);
Expected result:
----------------
Resulting gz file should contain a test and Test directory, each with its original file.
Actual result:
--------------
The gz file contains just a "test" directory which contains the files originally in Test and test.
[2006-10-23 14:12 UTC] tim at skypanther dot com
Nevermind. The archives are just fine. What you see inside an archive depends on the client OS. So, if you create a tar/gz file that contains directories dir1 and Dir1 on a case-sensitive OS but open the archive on a case-insensitive OS (Windows) you see the directories merged. But, if you open it on a case-sensitive OS, the original directories are preserved.