Add files as string to tar archives
This commit is contained in:
parent
88c32861bc
commit
63570df75f
1 changed files with 2 additions and 6 deletions
|
@ -98,13 +98,9 @@ class OC_Archive_TAR extends OC_Archive {
|
|||
$this->remove($path);
|
||||
}
|
||||
if ($source and $source[0] == '/' and file_exists($source)) {
|
||||
$header = array();
|
||||
$dummy = '';
|
||||
$this->tar->_openAppend();
|
||||
$result = $this->tar->_addfile($source, $header, $dummy, $dummy, $path);
|
||||
} else {
|
||||
$result = $this->tar->addString($path, $source);
|
||||
$source = file_get_contents($source);
|
||||
}
|
||||
$result = $this->tar->addString($path, $source);
|
||||
$this->fileList = false;
|
||||
$this->cachedHeaders = false;
|
||||
return $result;
|
||||
|
|
Loading…
Reference in a new issue