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;
                        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to