diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-01-23 17:08:26 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-01-23 17:08:26 +0300 |
commit | a486aa69ed3111c9f7486c466df3c9ba522f0361 (patch) | |
tree | d0402586722d40b3a45382ec2fa51121a70f66e1 /lib/Migration | |
parent | 19418917bd370af9edd756d10eeeafe2b966e6e5 (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.php | 5 |
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', |