@@ -211,7 +211,7 @@ private function getACL(IFileInfo $file): ?ACL {
211
211
try {
212
212
$ acls = $ file ->getAcls ();
213
213
} catch (Exception $ e ) {
214
- $ this ->logger ->error ('Error while getting file acls ' , ['exception ' => $ e ]);
214
+ $ this ->logger ->warning ('Error while getting file acls ' , ['exception ' => $ e ]);
215
215
return null ;
216
216
}
217
217
foreach ($ acls as $ user => $ acl ) {
@@ -462,6 +462,7 @@ public function fopen($path, $mode) {
462
462
case 'r ' :
463
463
case 'rb ' :
464
464
if (!$ this ->file_exists ($ path )) {
465
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', file doesn \'t exist. ' );
465
466
return false ;
466
467
}
467
468
return $ this ->share ->read ($ fullPath );
@@ -489,11 +490,13 @@ public function fopen($path, $mode) {
489
490
}
490
491
if ($ this ->file_exists ($ path )) {
491
492
if (!$ this ->isUpdatable ($ path )) {
493
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', file not updatable. ' );
492
494
return false ;
493
495
}
494
496
$ tmpFile = $ this ->getCachedFile ($ path );
495
497
} else {
496
498
if (!$ this ->isCreatable (dirname ($ path ))) {
499
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', parent directory not writable. ' );
497
500
return false ;
498
501
}
499
502
$ tmpFile = \OC ::$ server ->getTempManager ()->getTemporaryFile ($ ext );
@@ -508,10 +511,13 @@ public function fopen($path, $mode) {
508
511
}
509
512
return false ;
510
513
} catch (NotFoundException $ e ) {
514
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', not found. ' , ['exception ' => $ e ]);
511
515
return false ;
512
516
} catch (ForbiddenException $ e ) {
517
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', forbidden. ' , ['exception ' => $ e ]);
513
518
return false ;
514
519
} catch (OutOfSpaceException $ e ) {
520
+ $ this ->logger ->warning ('Failed to open ' . $ path . ' on ' . $ this ->getId () . ', out of space. ' , ['exception ' => $ e ]);
515
521
throw new EntityTooLargeException ('not enough available space to create file ' , 0 , $ e );
516
522
} catch (ConnectException $ e ) {
517
523
$ this ->logger ->error ('Error while opening file ' , ['exception ' => $ e ]);
0 commit comments