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

Fix bug where resource with name consists of only numbers won't showup in the trash bin #10920

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Resources with name consist of number won't show up in trash bin

We've fixed a bug, where deleted resources that have only numbers in name like "123" won't show up in the trash bin

https://github.com/owncloud/web/pull/10920
https://github.com/owncloud/web/issues/10917
2 changes: 1 addition & 1 deletion packages/web-client/src/helpers/resource/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export function buildResource(resource: WebDavResponseResource): Resource {

export function buildDeletedResource(resource: WebDavResponseResource): Resource {
const isFolder = resource.type === 'directory'
const fullName = resource.props[DavProperty.TrashbinOriginalFilename]
const fullName = resource.props[DavProperty.TrashbinOriginalFilename]?.toString()
const extension = extractExtensionFromFile({ name: fullName, type: resource.type } as Resource)
const id = path.basename(resource.filename)
return {
Expand Down