[Bf-blender-cvs] [4ca4f04] master: Fix file size not drawn using Link/Append

julianeisel noreply at git.blender.org
Mon Feb 9 22:08:45 CET 2015


Commit: 4ca4f04c75c456d3614855ebaa70bab9a92eb36a
Author: julianeisel
Date:   Mon Feb 9 22:06:07 2015 +0100
Branches: master
https://developer.blender.org/rB4ca4f04c75c456d3614855ebaa70bab9a92eb36a

Fix file size not drawn using Link/Append

For linking/appending, .blends get the type S_IFDIR added which prevents
the size from being drawn. BLI_is_dir gets the type from the OS so it's
better suited for this case.

Reported by @sergey.

===================================================================

M	source/blender/editors/space_file/file_draw.c

===================================================================

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 98e0a17..5761193 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -591,7 +591,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
 
 		if (params->display == FILE_SHORTDISPLAY) {
 			sx += (int)layout->column_widths[COLUMN_NAME] + column_space;
-			if (!(file->type & S_IFDIR)) {
+			if ((BLI_is_dir(file->path) == false) && file->size[0]) {
 				file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align);
 				sx += (int)layout->column_widths[COLUMN_SIZE] + column_space;
 			}
@@ -620,7 +620,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
 			file_draw_string(sx, sy, file->time, layout->column_widths[COLUMN_TIME], layout->tile_h, align);
 			sx += (int)layout->column_widths[COLUMN_TIME] + column_space;
 
-			if (!(file->type & S_IFDIR)) {
+			if ((BLI_is_dir(file->path) == false) && file->size[0]) {
 				file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align);
 				sx += (int)layout->column_widths[COLUMN_SIZE] + column_space;
 			}




More information about the Bf-blender-cvs mailing list