Skip to content

Commit f8fdc8f

Browse files
authored
Merge pull request #54382 from nextcloud/bug/noid/jump-to-files-empty-file-list-30
[stable30] fix: use the join function for merging davRootPath and path
2 parents dbf1b69 + 16c57a7 commit f8fdc8f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

apps/files/src/services/Files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { FileStat, ResponseDataDetailed } from 'webdav'
77

88
import { CancelablePromise } from 'cancelable-promise'
99
import { davGetDefaultPropfind, davResultToNode, davRootPath } from '@nextcloud/files'
10+
import { join } from 'path'
1011
import { client } from './WebdavClient.ts'
1112
import logger from '../logger.ts'
1213

@@ -17,11 +18,10 @@ import logger from '../logger.ts'
1718
export const resultToNode = (node: FileStat): Node => davResultToNode(node)
1819

1920
export const getContents = (path = '/'): CancelablePromise<ContentsWithRoot> => {
21+
path = join(davRootPath, path)
2022
const controller = new AbortController()
2123
const propfindPayload = davGetDefaultPropfind()
2224

23-
path = `${davRootPath}${path}`
24-
2525
return new CancelablePromise(async (resolve, reject, onCancel) => {
2626
onCancel(() => controller.abort())
2727
try {

dist/files-init.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)