aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-04-11 19:43:41 +0200
committerGitHub <noreply@github.com>2023-04-11 19:43:41 +0200
commitec1acb92c72ef02527bc5649ad7a781e20c347f1 (patch)
tree94da4df6580cf2d6dc4c7fd0de961af69d131d8a /apps
parent784b2bd703c920e682fc7af2bbfe41befcc6f43a (diff)
parent570b64aafcd57958d142ec829eac877c472542c0 (diff)
downloadnextcloud-server-ec1acb92c72ef02527bc5649ad7a781e20c347f1.tar.gz
nextcloud-server-ec1acb92c72ef02527bc5649ad7a781e20c347f1.zip
Merge pull request #37617 from nextcloud/notify-self-test-error
handle not being able to write file for notify self-test
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Command/Notify.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php
index 60639f7dbe4..5013d88539b 100644
--- a/apps/files_external/lib/Command/Notify.php
+++ b/apps/files_external/lib/Command/Notify.php
@@ -326,7 +326,10 @@ class Notify extends Base {
private function selfTest(IStorage $storage, INotifyHandler $notifyHandler, OutputInterface $output) {
usleep(100 * 1000); //give time for the notify to start
- $storage->file_put_contents('/.nc_test_file.txt', 'test content');
+ if (!$storage->file_put_contents('/.nc_test_file.txt', 'test content')) {
+ $output->writeln("Failed to create test file for self-test");
+ return;
+ }
$storage->mkdir('/.nc_test_folder');
$storage->file_put_contents('/.nc_test_folder/subfile.txt', 'test content');