diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 5013d88539b..60639f7dbe4 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -326,10 +326,7 @@ class Notify extends Base { private function selfTest(IStorage $storage, INotifyHandler $notifyHandler, OutputInterface $output) { usleep(100 * 1000); //give time for the notify to start - if (!$storage->file_put_contents('/.nc_test_file.txt', 'test content')) { - $output->writeln("Failed to create test file for self-test"); - return; - } + $storage->file_put_contents('/.nc_test_file.txt', 'test content'); $storage->mkdir('/.nc_test_folder'); $storage->file_put_contents('/.nc_test_folder/subfile.txt', 'test content'); diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 23f63dee264..3473eebc4a0 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -207,9 +207,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { public function file_put_contents($path, $data) { $handle = $this->fopen($path, "w"); - if (!$handle) { - return false; - } $this->removeCachedFile($path); $count = fwrite($handle, $data); fclose($handle);