Skip to content

Commit

Permalink
Merge pull request #1028 from nextcloud-libraries/fix/displayname
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Jul 25, 2024
2 parents 29ba544 + 9aadb28 commit 0a37765
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dav/dav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export const davResultToNode = function(node: FileStat, filesRoot = davRootPath,
source: `${remoteURL}${node.filename}`,
mtime: new Date(Date.parse(node.lastmod)),
mime: node.mime || 'application/octet-stream',
displayname: props.displayname,
// Manually cast to work around for https://github.com/perry-mitchell/webdav-client/pull/380
displayname: props.displayname !== undefined ? String(props.displayname) : undefined,
size: props?.size || Number.parseInt(props.getcontentlength || '0'),
// The fileid is set to -1 for failed requests
status: id < 0 ? NodeStatus.FAILED : undefined,
Expand Down

0 comments on commit 0a37765

Please sign in to comment.