Using empty file as ZipArchive is deprecated

Fix #27064
This commit is contained in:
acsfer 2021-05-22 13:44:24 +02:00 committed by GitHub
parent 259e75568c
commit f60e7d3f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class ZIP extends Archive {
public function __construct($source) { public function __construct($source) {
$this->path = $source; $this->path = $source;
$this->zip = new \ZipArchive(); $this->zip = new \ZipArchive();
if ($this->zip->open($source, \ZipArchive::CREATE)) { if ($this->zip->open($source, \ZipArchive::OVERWRITE)) {
} else { } else {
\OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, ILogger::WARN); \OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, ILogger::WARN);
} }