Skip to content

fix(viewer): keep a legacy dav source relative to its dav home - #65009

Open
skjnldsv wants to merge 1 commit into
masterfrom
fix/viewer-legacy-dav-root
Open

skjnldsv wants to merge 1 commit into
masterfrom
fix/viewer-legacy-dav-root

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Since the viewer moved into the server, OCA.Viewer.open() fails for any file info whose source is on dav, which is what the photos app hands over for every photo:

Error: The root must be relative to the service. e.g /files/emma
    at d (core-viewer-init.mjs)
    at Object.S [as open] (core-viewer-init.mjs)
    at Proxy.openViewer (photos TimelineView)

nodeFromFileInfo took the folder of the source as the root of the node it builds. For a dav source that folder starts with /remote.php/dav, and the node rejects it. A dav source now gets the home of its service as root (/files/emma, /photos/emma); any other source keeps its folder, as before.

Found on nextcloud/photos#3919, where every Playwright test opening a photo fails with the error above: https://github.com/nextcloud/photos/actions/runs/36981741535

The two new cases in legacy.spec.ts fail without the change and pass with it.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

OCA.Viewer.open() took the folder of a file info's source as the root of
the node it builds. For a source on dav, that folder starts with
/remote.php/dav, and a node rejects it:

  Error: The root must be relative to the service. e.g /files/emma

Apps hand over the dav address of the file they open, as the photos app
does for every photo, so none of them opened. A dav source now gets the
home of its service as root, /files/emma or /photos/emma; any other
source keeps its folder.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv requested a review from a team as a code owner October 2, 2026 10:34
@skjnldsv skjnldsv added bug 3. to review Waiting for reviews labels Oct 2, 2026
@skjnldsv
skjnldsv removed the request for review from a team October 2, 2026 10:34
@skjnldsv skjnldsv added the bug label Oct 2, 2026
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label Oct 2, 2026
@skjnldsv

skjnldsv commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

/compile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants