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

Trash displays folder sizes incorrectly #4326

Open
SoapOperaTester opened this issue Jan 2, 2025 · 3 comments
Open

Trash displays folder sizes incorrectly #4326

SoapOperaTester opened this issue Jan 2, 2025 · 3 comments
Labels
area-trashbin An issue related to the trash bin feature Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty.

Comments

@SoapOperaTester
Copy link

Describe the bug
The confirmation dialog shows size as 0 B, inconsistent with the 3.45 kB listed in the Trash Bin.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Hamburger' menu
  2. Click on 'Trash Bin'
  3. Select an item in 'Trash Bin'
  4. Attempt to restore the item
  5. Observe the confirmation dialog details

Expected behavior
File sizes in confirmation should match the actual sizes listed previously.

Screen Recording

Screen.Recording.mov

Smartphone (please complete the following information):

  • Device: [Google Pixel 5]
  • OS: [Android 14]
  • Rooted: [No]
  • Version: [3.10]

Additional context
The issue also occurs with incorrect file size representation in the Delete confirmation dialog.

@VishnuSanal VishnuSanal changed the title Incorrect file size representation in restore confirmation Trash always shows folder sizes as 3.45 kB regardless of it's original size Jan 12, 2025
@VishnuSanal VishnuSanal added Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty. area-trashbin An issue related to the trash bin feature labels Jan 12, 2025
@EmmanuelMess
Copy link
Member

Empty files and folder should be larger than 0B in the trash, because deleted metadata also counts as part of the "trash content" (as opposed to when the file/folder is not in the trash, where metadata doesn't count towards file/folder size).

Closing for now as I don't think we would change how this works, but we can discuss further if you feel this is unintuitive or if the size accounting for metadata is wrong.

@VishnuSanal
Copy link
Member

@EmmanuelMess it shows very different or under-estimated folder sizes regardless of it's original size; which is unintuitive & should be fixed, IMO.

for example, one directory on my phone originally ~60 MB showed up as 8.45 kB in trash & directories originally with less data (or empty) showed up as 3.45 kB.

what do you think?

@VishnuSanal VishnuSanal reopened this Feb 12, 2025
@EmmanuelMess
Copy link
Member

what do you think?

Its a bug. Size should be cached as part of the trash metadata when deleting stuff.

@VishnuSanal VishnuSanal changed the title Trash always shows folder sizes as 3.45 kB regardless of it's original size Trash displays folder sizes incorrectly Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-trashbin An issue related to the trash bin feature Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty.
Projects
None yet
Development

No branches or pull requests

3 participants