https://bugs.kde.org/show_bug.cgi?id=457363

Méven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kio/-/commit/005b5f9
                   |                            |ae892cec435eadf72b583f35548
                   |                            |43f15f
         Resolution|---                         |FIXED

--- Comment #2 from Méven <[email protected]> ---
Git commit 005b5f9ae892cec435eadf72b583f3554843f15f by Méven Car.
Committed on 17/08/2026 at 13:16.
Pushed by meven into branch 'master'.

properties: show how much room a folder takes up, not only its data

The size of a folder was the sum of everything the listing reported,
which includes the size of the folders themselves. That number is the
list of entries a directory holds, and it differs wildly between
filesystems: the same folder copied from btrfs to FAT32 grew by 617 KiB
without a byte of data changing, because FAT32 wants 32 KiB per
directory. It also disagreed with what Dolphin shows, since the folder
size column counts files and skips directories, as does the information
panel.

Count the files only, so the number matches the other two places and a
user can compare a folder with its copy elsewhere.

The room a folder really takes up is worth knowing too, and it is not
the sum of the file sizes either: the last block of a file is rarely
full, a sparse or compressed file can hold more than it occupies, and
the directories do take their space. Report it next to the size, the way
file managers on other systems do.

It comes from the number of blocks the filesystem allocated. UDS_SIZE_ON_DISK
carries it, KIO::StatSizeOnDisk asks for it, and DirectorySizeJob adds it up
in totalSizeOnDisk(). Asking is opt-in because a listing would otherwise
carry one more number for every single entry, and only this dialog wants
it. Local files only for now: no other worker knows the answer, and the
row stays hidden when nobody filled it in.

M  +54   -3    autotests/jobtest.cpp
M  +1    -0    autotests/jobtest.h
M  +27   -4    src/core/directorysizejob.cpp
M  +14   -1    src/core/directorysizejob.h
M  +3    -0    src/core/global.h
M  +4    -0    src/core/udsentry.h
M  +4    -0    src/kioworkers/file/file_unix.cpp
M  +37   -0    src/kioworkers/file/stat_unix.h
M  +44   -18   src/widgets/kfilepropspluginwidget.ui
M  +54   -8    src/widgets/kpropertiesdialogbuiltin_p.cpp

https://invent.kde.org/frameworks/kio/-/commit/005b5f9ae892cec435eadf72b583f3554843f15f

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to