@@ -190,6 +190,8 @@ protected function relativePath($fullPath) {
190
190
* @param string $path
191
191
* @return IFileInfo
192
192
* @throws StorageAuthException
193
+ * @throws \OCP\Files\NotFoundException
194
+ * @throws \OCP\Files\ForbiddenException
193
195
*/
194
196
protected function getFileInfo ($ path ) {
195
197
try {
@@ -366,7 +368,7 @@ public function rename($source, $target, $retry = true): bool {
366
368
public function stat ($ path , $ retry = true ) {
367
369
try {
368
370
$ result = $ this ->formatInfo ($ this ->getFileInfo ($ path ));
369
- } catch (ForbiddenException $ e ) {
371
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
370
372
return false ;
371
373
} catch (\OCP \Files \NotFoundException $ e ) {
372
374
return false ;
@@ -587,7 +589,7 @@ public function getMetaData($path) {
587
589
$ fileInfo = $ this ->getFileInfo ($ path );
588
590
} catch (\OCP \Files \NotFoundException $ e ) {
589
591
return null ;
590
- } catch (ForbiddenException $ e ) {
592
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
591
593
return null ;
592
594
}
593
595
if (!$ fileInfo ) {
@@ -663,7 +665,7 @@ public function filetype($path) {
663
665
return $ this ->getFileInfo ($ path )->isDirectory () ? 'dir ' : 'file ' ;
664
666
} catch (\OCP \Files \NotFoundException $ e ) {
665
667
return false ;
666
- } catch (ForbiddenException $ e ) {
668
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
667
669
return false ;
668
670
}
669
671
}
@@ -698,7 +700,7 @@ public function file_exists($path) {
698
700
return true ;
699
701
} catch (\OCP \Files \NotFoundException $ e ) {
700
702
return false ;
701
- } catch (ForbiddenException $ e ) {
703
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
702
704
return false ;
703
705
} catch (ConnectException $ e ) {
704
706
throw new StorageNotAvailableException ($ e ->getMessage (), (int )$ e ->getCode (), $ e );
@@ -711,7 +713,7 @@ public function isReadable($path) {
711
713
return $ this ->showHidden || !$ info ->isHidden ();
712
714
} catch (\OCP \Files \NotFoundException $ e ) {
713
715
return false ;
714
- } catch (ForbiddenException $ e ) {
716
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
715
717
return false ;
716
718
}
717
719
}
@@ -724,7 +726,7 @@ public function isUpdatable($path) {
724
726
return ($ this ->showHidden || !$ info ->isHidden ()) && (!$ info ->isReadOnly () || $ info ->isDirectory ());
725
727
} catch (\OCP \Files \NotFoundException $ e ) {
726
728
return false ;
727
- } catch (ForbiddenException $ e ) {
729
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
728
730
return false ;
729
731
}
730
732
}
@@ -735,7 +737,7 @@ public function isDeletable($path) {
735
737
return ($ this ->showHidden || !$ info ->isHidden ()) && !$ info ->isReadOnly ();
736
738
} catch (\OCP \Files \NotFoundException $ e ) {
737
739
return false ;
738
- } catch (ForbiddenException $ e ) {
740
+ } catch (\ OCP \ Files \ ForbiddenException $ e ) {
739
741
return false ;
740
742
}
741
743
}
0 commit comments