summaryrefslogtreecommitdiff
path: root/inc/Tar.class.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2013-05-10 14:35:28 +0200
committerGuy Brand <gb@unistra.fr>2013-05-10 14:35:28 +0200
commit83f133d10eda8c1c6b6429c08b2d0722ca88ca17 (patch)
tree0377662d2335a0e2160175d5be3b95a92f6bb332 /inc/Tar.class.php
parentbc250e0ee2ec4fba891b53aa4f1814ce648ac71a (diff)
parent2a5a1456564635ddbca06edbc902e7f820d2a97b (diff)
downloadrpg-83f133d10eda8c1c6b6429c08b2d0722ca88ca17.tar.gz
rpg-83f133d10eda8c1c6b6429c08b2d0722ca88ca17.tar.bz2
Merge branch master into stable
Diffstat (limited to 'inc/Tar.class.php')
-rw-r--r--inc/Tar.class.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 20f397395..d1a38ea0e 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -262,7 +262,7 @@ class Tar {
if(!$this->fh) throw new TarIOException('Could not open file for writing: '.$this->file);
}
- $this->writeaccess = false;
+ $this->writeaccess = true;
$this->closed = false;
}
@@ -296,7 +296,10 @@ class Tar {
);
while(!feof($fp)) {
- $packed = pack("a512", fread($fp, 512));
+ $data = fread($fp, 512);
+ if($data === false) break;
+ if($data === '') break;
+ $packed = pack("a512", $data);
$this->writebytes($packed);
}
fclose($fp);