summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-04-06 11:52:22 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-04-13 06:18:36 +0000
commita9c2373db74c6dab6a84f7b60ed58854854d97fa (patch)
tree65d498c160f5c53834db84be7572709ad0c9cee0 /apps
parentb1985ebb0f92505a692b1bffafd9411efcf96d5f (diff)
downloadnextcloud-server-a9c2373db74c6dab6a84f7b60ed58854854d97fa.tar.gz
nextcloud-server-a9c2373db74c6dab6a84f7b60ed58854854d97fa.zip
handle not being able to write file for notify self-test
Signed-off-by: Robin Appelman <robin@icewind.nl>
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 340dd2fdca1..9b7bf656d7f 100644
--- a/apps/files_external/lib/Command/Notify.php
+++ b/apps/files_external/lib/Command/Notify.php
@@ -333,7 +333,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');