Merge pull request #37718 from nextcloud/revert-37701-backport/37617/stable26

Revert "[stable26] handle not being able to write file for notify self-test"
This commit is contained in:
John Molakvoæ 2023-04-14 14:05:54 +02:00 committed by GitHub
commit 3c3c28ea94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View file

@ -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');

View file

@ -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);