File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
apps/dav/lib/Connector/Sabre Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -521,19 +521,16 @@ public function getNodeForPath($path): INode {
521521 $ destinationDir = dirname ($ destinationPath );
522522
523523 try {
524- $ this ->fileView ->verifyPath ($ destinationDir , $ destinationName , true );
525- $ info = $ this ->fileView ->getFileInfo ($ destinationPath );
524+ /** @var File|Folder $internalNode */
525+ $ internalNode = $ this ->getNode ()->get ($ path );
526+ $ info = $ internalNode ->getFileInfo ();
527+ } catch (NotFoundException $ e ) {
528+ throw new \Sabre \DAV \Exception \NotFound ('File with name ' . $ destinationPath
529+ . ' could not be located ' );
526530 } catch (StorageNotAvailableException $ e ) {
527531 throw new \Sabre \DAV \Exception \ServiceUnavailable ($ e ->getMessage (), 0 , $ e );
528- } catch (InvalidPathException $ ex ) {
532+ } catch (NotPermittedException $ ex ) {
529533 throw new InvalidPath ($ ex ->getMessage (), false , $ ex );
530- } catch (ForbiddenException $ e ) {
531- throw new \Sabre \DAV \Exception \Forbidden ($ e ->getMessage (), $ e ->getCode (), $ e );
532- }
533-
534- if (!$ info ) {
535- throw new \Sabre \DAV \Exception \NotFound ('File with name ' . $ destinationPath
536- . ' could not be located ' );
537534 }
538535
539536 // if not in a public share with no read permissions, throw Forbidden
You can’t perform that action at this time.
0 commit comments