diff options
author | julianeisel <julian_eisel@web.de> | 2015-02-10 00:06:07 +0300 |
---|---|---|
committer | julianeisel <julian_eisel@web.de> | 2015-02-10 00:06:45 +0300 |
commit | 4ca4f04c75c456d3614855ebaa70bab9a92eb36a (patch) | |
tree | 8756c39874bb769ac8234a6e9aa5acbd96c24231 /source/blender/editors/space_file/file_draw.c | |
parent | 4edc1bbe0277620aa9f272d98ea8d4f3642ce2ec (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 98e0a176b0e..57611930e99 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; } |