Skip to content

Commit

Permalink
Use the new name property in the buildResource method
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Aug 22, 2022
1 parent d3c6142 commit f844f2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/web-app-files/src/helpers/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ export function buildResource(resource): Resource {
}

const id = resource.fileInfo[DavProperty.FileId]
const name = resource.fileInfo[DavProperty.Name]
? resource.fileInfo[DavProperty.Name]
: path.basename(resource.name)

return {
id,
fileId: resource.fileInfo[DavProperty.FileId],
storageId: extractStorageId(resource.fileInfo[DavProperty.FileId]),
mimeType: resource.fileInfo[DavProperty.MimeType],
name: path.basename(resource.name),
name,
extension: isFolder ? '' : extension,
path: resourcePath,
webDavPath: resource.name,
Expand Down

0 comments on commit f844f2d

Please sign in to comment.