fix: fix getting the folder node from the dav response

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-08-09 15:17:57 +02:00 committed by Ferdinand Thiessen
parent dbd197cedc
commit 69ea15cc98
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

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