Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions setup-nextcloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,14 @@ static public function install() {

// unpacking into nextcloud folder
$zip = new ZipArchive;
$res = $zip->open('nc.zip');
if ($res==true) {
$zipState = $zip->open('nc.zip');
if ($zipState === true) {
// Extract it to the tmp dir
$nextcloud_tmp_dir = 'tmp-nextcloud'.time();
$zip->extractTo($nextcloud_tmp_dir);
$extraction = $zip->extractTo($nextcloud_tmp_dir);
if ($extraction === false) {
return 'Error during unpacking zipfile: ' . ($zip->getStatusString());
}
$zip->close();

// Move it to the folder
Expand All @@ -167,7 +170,7 @@ static public function install() {
// Delete the tmp folder
rmdir($nextcloud_tmp_dir);
} else {
$error.='unzip of nextcloud source file failed.<br />';
$error.='Unzip of nextcloud source file failed: ' . print_r($zipState, true) . ' <br />';
}

// deleting zip file
Expand Down