Skip to content

Commit

Permalink
Don't retrieve file info for long headers for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mrook committed Dec 20, 2018
1 parent 58715c9 commit 7600289
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions Archive/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -1567,26 +1567,17 @@ public function _writeHeaderBlock(
*/
public function _writeLongHeader($p_filename, $is_link = false)
{
$v_info = lstat($p_filename);
$v_uid = sprintf("%07s", 0);
$v_gid = sprintf("%07s", 0);
$v_perms = sprintf("%07s", DecOct($v_info['mode'] & 000777));
$v_perms = sprintf("%07s", 0);
$v_size = sprintf("%'011s", DecOct(strlen($p_filename)));
$v_mtime = sprintf("%011s", 0);
$v_typeflag = ($is_link ? 'K' : 'L');
$v_linkname = '';
$v_magic = 'ustar ';
$v_version = ' ';
if (function_exists('posix_getpwuid')) {
$userinfo = posix_getpwuid($v_info[4]);
$groupinfo = posix_getgrgid($v_info[5]);

$v_uname = $userinfo['name'];
$v_gname = $groupinfo['name'];
} else {
$v_uname = '';
$v_gname = '';
}
$v_uname = '';
$v_gname = '';
$v_devmajor = '';
$v_devminor = '';
$v_prefix = '';
Expand Down

0 comments on commit 7600289

Please sign in to comment.