Skip to content

Commit

Permalink
Merge pull request #1 from zero-24/patch-2
Browse files Browse the repository at this point in the history
Codestyle for #6554
  • Loading branch information
OctavianC committed Jun 17, 2015
2 parents e65107e + aa0a508 commit 9434672
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions libraries/joomla/archive/tar.php
Expand Up @@ -33,7 +33,7 @@ class JArchiveTar implements JArchiveExtractable
* @since 11.1
*/
private $_types = array(
0x0 => 'Unix file',
0x0 => 'Unix file',
0x30 => 'File',
0x31 => 'Link',
0x32 => 'Symbolic link',
Expand Down Expand Up @@ -183,9 +183,11 @@ protected function _getTarInfo(& $data)
);
}

/* This variable has been set in the previous loop,
meaning that the filename was present in the previous block
to allow more than 100 characters - see below */
/**
* This variable has been set in the previous loop,
* meaning that the filename was present in the previous block
* to allow more than 100 characters - see below
*/
if (isset($longlinkfilename))
{
$info['filename'] = $longlinkfilename;
Expand Down Expand Up @@ -220,7 +222,7 @@ protected function _getTarInfo(& $data)

if (($info['typeflag'] == 0) || ($info['typeflag'] == 0x30) || ($info['typeflag'] == 0x35))
{
/* File or folder. */
// File or folder.
$file['data'] = $contents;

$mode = hexdec(substr($info['mode'], 4, 3));
Expand All @@ -230,15 +232,16 @@ protected function _getTarInfo(& $data)
}
elseif (chr($info['typeflag']) == 'L' && $info['filename'] == '././@LongLink')
{
/* GNU tar ././@LongLink support - the filename is actually in the contents, setting a variable here so we can test in the next loop */
// GNU tar ././@LongLink support - the filename is actually in the contents,
// setting a variable here so we can test in the next loop
$longlinkfilename = $contents;

/* And the file contents are in the next block so we'll need to skip this */
// And the file contents are in the next block so we'll need to skip this
continue;
}
else
{
/* Some other type. */
// Some other type.
}

$return_array[] = $file;
Expand Down

0 comments on commit 9434672

Please sign in to comment.