Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: files root detection for publis shares
Signed-off-by: skjnldsv <[email protected]>
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Oct 29, 2025
commit dcbce6fe242ecc1469c4ec71a34d83a491d679a7
5 changes: 2 additions & 3 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ export default defineComponent({
// sort like the files list
// TODO: implement global sorting API
// https://github.com/nextcloud/server/blob/a83b79c5f8ab20ed9b4d751167417a65fa3c42b8/apps/files/lib/Controller/ApiController.php#L247
const url = this.currentFile.source ?? this.currentFile.davPath
const nodes = filteredFiles.map(
file => new NcFile({
source: davRemoteURL + davGetRootPath() + file.filename,
Expand All @@ -787,7 +786,7 @@ export default defineComponent({
mime: file.mime,
mtime: new Date(file.lastmod),
owner: this.currentFile.ownerId,
root: url.includes('remote.php/dav') ? davGetRootPath() : undefined,
root: davGetRootPath(),
}),
)
const sortedNodes = sortNodes(nodes, {
Expand All @@ -796,7 +795,7 @@ export default defineComponent({
})

this.fileList = sortedNodes.map(node => {
return filteredFiles.find(file => file.filename === String(dirPath + node.path))
return filteredFiles.find(file => file.filename === node.path)
})
// store current position
this.currentIndex = this.fileList.findIndex(file => file.filename === fileInfo.filename)
Expand Down