Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable4] Manual backport of #893 (size is always 0B) #895

Merged
merged 1 commit into from Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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