summaryrefslogtreecommitdiff
path: root/inc/Tar.class.php
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-07-14 13:35:06 +0200
committerKlap-in <klapinklapin@gmail.com>2013-07-14 13:35:06 +0200
commit33c3b3817b00aa9384760813643fac0e33daaaff (patch)
tree481c880b00a32ba5887834b52a17248bac8bfc7c /inc/Tar.class.php
parent040f0e135c37c5b544f16277ff69205369df5f1f (diff)
parentfbd8067eeeb9f424981aad8b283e17f734c738c3 (diff)
downloadrpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.gz
rpg-33c3b3817b00aa9384760813643fac0e33daaaff.tar.bz2
merge master in branch
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);