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.
This commit is contained in:
julianeisel
2015-02-09 22:06:07 +01:00
parent 4edc1bbe02
commit 4ca4f04c75

View File

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