Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-09-09 18:29:21 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-09-09 18:29:21 +0300
commit6d4b311888d01f32381d8838a440981134613d40 (patch)
tree83b752fb1c09ec6166afcab72670ec01ae0cf3e6 /source/blender/blenlib
parent2b2739724e6502d2798d22b516a4ffb61596c556 (diff)
UI: File Browser Sizes in Binary for Windows
This adds per-platform change so Windows users will see file sizes calculated with a base of 1024. Differential Revision: https://developer.blender.org/D5714 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/BLI_filelist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index 3c53d1eee1b..a3b745fd63e 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -271,7 +271,11 @@ void BLI_filelist_entry_size_to_string(const struct stat *st,
* everyone starts using __USE_FILE_OFFSET64 or equivalent.
*/
double size = (double)(st ? st->st_size : sz);
+#ifdef WIN32
+ BLI_str_format_byte_unit(r_size, size, false);
+#else
BLI_str_format_byte_unit(r_size, size, true);
+#endif
}
/**