Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-23 17:08:26 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-23 17:08:26 +0300
commita486aa69ed3111c9f7486c466df3c9ba522f0361 (patch)
treed0402586722d40b3a45382ec2fa51121a70f66e1 /lib/Migration
parent19418917bd370af9edd756d10eeeafe2b966e6e5 (diff)
Check return value of chmod
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/MakeItineraryExtractorExecutable.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Migration/MakeItineraryExtractorExecutable.php b/lib/Migration/MakeItineraryExtractorExecutable.php
index a1efe387c..88831cc3b 100644
--- a/lib/Migration/MakeItineraryExtractorExecutable.php
+++ b/lib/Migration/MakeItineraryExtractorExecutable.php
@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace OCA\Mail\Migration;
+use Exception;
use OCP\ILogger;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
@@ -62,7 +63,9 @@ class MakeItineraryExtractorExecutable implements IRepairStep {
return;
}
try {
- @chmod($this->file, 744);
+ if (!@chmod($this->file, 744)) {
+ throw new Exception('chmod returned false');
+ }
} catch (Throwable $e) {
$this->logger->logException($e, [
'message' => 'Can\'t make itinerary extractor executable',