diff options
author | Robin Appelman <robin@icewind.nl> | 2023-04-06 11:52:22 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-04-13 06:18:36 +0000 |
commit | a9c2373db74c6dab6a84f7b60ed58854854d97fa (patch) | |
tree | 65d498c160f5c53834db84be7572709ad0c9cee0 /apps | |
parent | b1985ebb0f92505a692b1bffafd9411efcf96d5f (diff) | |
download | nextcloud-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.php | 5 |
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'); |