You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to extract a .tgz file with UnifiedArchive it reports the following error message:
In Tar.php line 369:
"Cannot access phar file entry '/' in archive 'myfile.tgz'"
Doing the same with CLI commands gunzip myfile.tgz & tar xf myfile.tar works fine.
UnifiedArchive seems to have trouble with the entry ./ in the tar file. The file myfile.tgz which causes the error message when trying to extract it can be created as follows:
tmp# ls
myfile.xml
tmp# tar -cvf myfile.tar .
./
tar: ./myfile.tar: file is the archive; not dumped
./myfile.xml
Describe the bug
When trying to extract a .tgz file with UnifiedArchive it reports the following error message:
In Tar.php line 369:
"Cannot access phar file entry '/' in archive 'myfile.tgz'"
Doing the same with CLI commands gunzip myfile.tgz & tar xf myfile.tar works fine.
Configuration
"php": "^7.0",
"ext-phar": "",
"ext-zip": "",
"ext-zlib": "*",
"pear/archive_tar": "~1.4.3",
"wapmorgan/unified-archive": "^0.1"
tar -tvf myfile.tar shows this (shortened list):
drwxr-xr-x web/users 0 2019-01-11 02:10 ./
-rw-r--r-- web/users 15254 2019-01-11 02:10 ./myfile.xml
To Reproduce
$archive = UnifiedArchive::open($absoluteArchiveFilePath);
$numberOfFiles = $archive->extractFiles($absoluteTargetDirPath);
Expected behavior
Contents of .tgz file should be extracted to the target directory.
The text was updated successfully, but these errors were encountered: