Skip to content

Cannot access phar file entry '/' in archive 'myfile.tgz'  #12

@BigNerd

Description

@BigNerd

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

  • OS: linux debian 9.3
  • Version of library: 0.1.2
  • Satisfied Composer dependencies (selection)
    "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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions