summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-05-03 17:52:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-05-03 17:52:48 +0200
commit46ac8ef9ac8c7465449cd3d33c21148c75241ac8 (patch)
tree3e6c6d2c44481a8d61729595ad25b8afc18facd8 /inc
parente63eccff3ef8998a3dac6034132970be5dad0069 (diff)
downloadrpg-46ac8ef9ac8c7465449cd3d33c21148c75241ac8.tar.gz
rpg-46ac8ef9ac8c7465449cd3d33c21148c75241ac8.tar.bz2
Tar: avoid lone zero blocks when adding 0 byte files
Diffstat (limited to 'inc')
-rw-r--r--inc/Tar.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 20f397395..10e82109b 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -295,7 +295,7 @@ class Tar {
filemtime($file)
);
- while(!feof($fp)) {
+ if(filesize($file)) while(!feof($fp)) {
$packed = pack("a512", fread($fp, 512));
$this->writebytes($packed);
}