fix: fix getting the folder node from the dav response

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/47171/head
Robin Appelman 2024-08-09 15:17:57 +07:00 committed by backportbot[bot]
parent 7a7444015e
commit c8b00569a2
1 changed files with 1 additions and 1 deletions

@ -50,7 +50,7 @@ export const getContents = async (path = '/'): Promise<ContentsWithRoot> => {
}) as ResponseDataDetailed<FileStat[]>
const contents = contentsResponse.data.map(resultToNode)
const [folder] = contents.splice(contents.findIndex((node) => node.dirname === path), 1)
const [folder] = contents.splice(contents.findIndex((node) => node.path === path), 1)
return {
folder: folder as Folder,