projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup2 according to Apmuthu's list.
[fa-stable.git]
/
includes
/
archive.inc
diff --git
a/includes/archive.inc
b/includes/archive.inc
index e679d6c7cb19f0008fa7f2be5236376ad50d7dd4..413e33081d30913f97136d45c4eb22835baa7b1d 100644
(file)
--- a/
includes/archive.inc
+++ b/
includes/archive.inc
@@
-324,7
+324,7
@@
class tar_file extends archive
{
$temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block);
$file = array (
{
$temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block);
$file = array (
- 'name' =>
$temp['prefix'] . $temp['name']
,
+ 'name' =>
rtrim($temp['prefix']) . rtrim($temp['name'])
,
'stat' => array (
2 => octdec($temp['mode']),
4 => octdec($temp['uid']),
'stat' => array (
2 => octdec($temp['mode']),
4 => octdec($temp['uid']),
@@
-395,7
+395,8
@@
class tar_file extends archive
else if ($new = @fopen($file['name'], "wb"))
{
fwrite($new, fread($fp, $file['stat'][7]));
else if ($new = @fopen($file['name'], "wb"))
{
fwrite($new, fread($fp, $file['stat'][7]));
- fread($fp, (512 - $file['stat'][7] % 512) == 512 ? 0 : (512 - $file['stat'][7] % 512));
+ if ($file['stat'][7] % 512)
+ fread($fp, 512 - $file['stat'][7] % 512);
fclose($new);
@chmod($file['name'], $file['stat'][2]);
}
fclose($new);
@chmod($file['name'], $file['stat'][2]);
}
@@
-462,4
+463,3
@@
class gzip_file extends tar_file
}
}
}
}
-?>
\ No newline at end of file