From a42e408b1cfa2e1e3b14e1d19a8c320d2e97bff3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 20 Dec 2017 14:33:07 +0100 Subject: [sysconfig] Error checks + messages when rebuilding module --- modules-available/sysconfig/inc/configmodule.inc.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules-available/sysconfig/inc/configmodule.inc.php') diff --git a/modules-available/sysconfig/inc/configmodule.inc.php b/modules-available/sysconfig/inc/configmodule.inc.php index cfe79802..2cee37a9 100644 --- a/modules-available/sysconfig/inc/configmodule.inc.php +++ b/modules-available/sysconfig/inc/configmodule.inc.php @@ -412,6 +412,9 @@ abstract class ConfigModule $this->markFailed(); return false; } + } elseif (!file_exists($tmpTgz)) { + EventLog::warning('ConfigModule::markUpdated for tmpTgz="' . $this->moduleTitle . '" called which doesn\'t exist. Doing nothing.'); + return true; } else { $task = Taskmanager::submit('MoveFile', array( 'source' => $tmpTgz, @@ -419,10 +422,11 @@ abstract class ConfigModule )); $task = Taskmanager::waitComplete($task, 5000); if (Taskmanager::isFailed($task) || !Taskmanager::isFinished($task)) { - if (!API && !AJAX) + if (!API && !AJAX) { Taskmanager::addErrorMessage($task); - else - EventLog::failure('Could not move ' . $tmpTgz . ' to ' . $this->moduleArchive . ' while generating "' . $this->moduleTitle . '"'); + } else { + EventLog::failure('Could not move ' . $tmpTgz . ' to ' . $this->moduleArchive . ' while generating "' . $this->moduleTitle . '"', print_r($task, true)); + } $this->markFailed(); return false; } -- cgit v1.2.3-55-g7522