AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Trash displays folder sizes incorrectly

Open SoapOperaTester opened this issue 1 year ago • 3 comments

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

https://github.com/user-attachments/assets/f2e69f44-994d-4c84-92e8-ce54a6a7ec43

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.

SoapOperaTester avatar Jan 02 '25 14:01 SoapOperaTester

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.

EmmanuelMess avatar Feb 10 '25 00:02 EmmanuelMess

@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 avatar Feb 12 '25 16:02 VishnuSanal

what do you think?

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

EmmanuelMess avatar Feb 12 '25 16:02 EmmanuelMess