Skip to content

Commit

Permalink
Merge pull request #895 from nextcloud-libraries/backport/893
Browse files Browse the repository at this point in the history
[stable4] Manual backport of #893 (size is always 0B)
  • Loading branch information
susnux committed Aug 15, 2023
2 parents 0e3f11d + faa9470 commit 8c7620c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/usables/dav.ts
Expand Up @@ -23,7 +23,7 @@ import type { Node } from '@nextcloud/files'
import type { ComputedRef, Ref } from 'vue'
import type { FileStat, ResponseDataDetailed, WebDAVClient } from 'webdav'

import { davGetClient, davGetFavoritesReport, davGetRecentSearch, davResultToNode, davRootPath } from '@nextcloud/files'
import { davGetClient, davGetDefaultPropfind, davGetFavoritesReport, davGetRecentSearch, davResultToNode, davRootPath } from '@nextcloud/files'
import { generateRemoteUrl } from '@nextcloud/router'
import { ref, watch } from 'vue'

Expand Down Expand Up @@ -90,7 +90,10 @@ export const useDAVFiles = function(currentView: Ref<'files'|'recent'|'favorites

files.value = results.data.map((r) => davResultToNode(r))
} else {
const results = await client.getDirectoryContents(`${davRootPath}${currentPath.value}`, { details: true }) as ResponseDataDetailed<FileStat[]>
const results = await client.getDirectoryContents(`${davRootPath}${currentPath.value}`, {
details: true,
data: davGetDefaultPropfind(),
}) as ResponseDataDetailed<FileStat[]>
files.value = results.data.map((r) => davResultToNode(r))
}

Expand Down

0 comments on commit 8c7620c

Please sign in to comment.