diff options
author | Robin Appelman <robin@icewind.nl> | 2023-04-06 11:52:22 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-04-06 11:52:22 +0200 |
commit | 570b64aafcd57958d142ec829eac877c472542c0 (patch) | |
tree | a047bb1d98e5879a4d1ff9f65bf4f71f51fe7cce /apps/files_external | |
parent | 1ac7a3f10730824c0c15671e3303ab57f12e217d (diff) | |
download | nextcloud-server-570b64aafcd57958d142ec829eac877c472542c0.tar.gz nextcloud-server-570b64aafcd57958d142ec829eac877c472542c0.zip |
handle not being able to write file for notify self-test
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-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 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'); |