fix: fix getting the folder node from the dav response

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/47153/head
Robin Appelman 2024-08-09 15:17:57 +07:00 committed by Ferdinand Thiessen
parent dbd197cedc
commit 69ea15cc98
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with 1 additions and 1 deletions

@ -35,7 +35,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,