diff options
author | Felipe Barriga Richards <[email protected]> | 2017-04-01 23:12:25 -0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-05-25 08:28:30 +0200 |
commit | b28445b3d2c42a7d2dbac97983d007e4ab58684d (patch) | |
tree | 3e654155d6deb53e40378e060eb972c9c957fec0 /libcaja-private/caja-directory-async.c | |
parent | 79fadd6ab9e93e46b5308bc6d3838ed93f225f98 (diff) | |
download | caja-b28445b3d2c42a7d2dbac97983d007e4ab58684d.tar.bz2 caja-b28445b3d2c42a7d2dbac97983d007e4ab58684d.tar.xz |
added feature: present the size on disk of files as we present the size of the file.
Diffstat (limited to 'libcaja-private/caja-directory-async.c')
-rw-r--r-- | libcaja-private/caja-directory-async.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index d90d3e76..d003eb23 100644 --- a/libcaja-private/caja-directory-async.c +++ b/libcaja-private/caja-directory-async.c @@ -2874,6 +2874,12 @@ deep_count_one (DeepCountState *state, { file->details->deep_size += g_file_info_get_size (info); } + /* Count the disk size. */ + if (!is_seen_inode && g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE)) + { + file->details->deep_size_on_disk += + g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE); + } } static void @@ -3053,6 +3059,7 @@ deep_count_load (DeepCountState *state, GFile *location) G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_SIZE "," + G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "," G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "," G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "," G_FILE_ATTRIBUTE_ID_FILESYSTEM "," @@ -3150,6 +3157,7 @@ deep_count_start (CajaDirectory *directory, file->details->deep_file_count = 0; file->details->deep_unreadable_count = 0; file->details->deep_size = 0; + file->details->deep_size_on_disk = 0; directory->details->deep_count_file = file; state = g_new0 (DeepCountState, 1); |