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
commite1418880e93b4395d7d8ebfe04c3514428f73ae6 (patch)
treed1ee9f3ae446a751ce31274e420211e9246cd7f1 /apps
parent75f14714e1dbf395a9b0264677188c1d4bc65134 (diff)
downloadnextcloud-server-e1418880e93b4395d7d8ebfe04c3514428f73ae6.tar.gz
nextcloud-server-e1418880e93b4395d7d8ebfe04c3514428f73ae6.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 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');