-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: always use proper path on node api when calling the view #36774
Conversation
a560685
to
8b9b738
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me but I'm no expert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that fix #34932 (comment) ?
Not directly I think, but we could probably refactor to just avoid using the View in server/apps/dav/lib/Connector/Sabre/Directory.php Lines 115 to 151 in 5d4efb4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sabre\Node::refreshInfo
will also need updating.
Overall the change is the right direction imo, and ensuring some consistency here should also make an eventual move to using the Node
api directly a bit easier
8b9b738
to
750a5a2
Compare
I think we have to revert #36589 because it causes a major regression with Talk/ attachment handling, see #36787 I also tested with this PR here and Talk/ is still not working. Given that we are behind feature freeze I vote to delay this here, revert the other PR on master until stable26 is branched off and try again for 27.l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blocking as per above
750a5a2
to
1efa1c6
Compare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Dry run of talk integration tests passes nextcloud/spreed#9173 |
Failing PR was reverted, this change is still good besides that for 27 now.
1efa1c6
to
2b85b04
Compare
} else { | ||
$this->node = new File($root, $view, $this->path, $info); | ||
$this->node = new File($root, $rootView, $this->fileView->getAbsolutePath($this->path), $info); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
$root = \OC::$server->get(IRootFolder::class); | ||
if ($info->getType() === FileInfo::TYPE_FOLDER) { | ||
$this->node = new Folder($root, $view, $this->path, $info); | ||
$this->node = new Folder($root, $rootView, $this->fileView->getAbsolutePath($this->path), $info); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2b85b04
to
d9c81f5
Compare
/backport to stable26 |
/backport to stable25 |
Make sure that the nodes API always uses the full path and root view.
This is only noticeable on places where the dav app already uses the new nodes api but could cause trouble in the future.
Seen this being an issue when the dav app passes a relative path and fake root view for the user but the full file system setup was dropped by #36589 when:
curl -X PROPFIND http://admin:admin@nextcloud.dev.local/remote.php/webdav/A -H 'Depth: 2'