wok-next annotate libfm/stuff/patches/empty-file.patch @ rev 20738
Up scons (3.0.1); add scons2 (2.5.1)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 29 21:13:51 2018 +0300 (2018-05-29) |
parents | 4688f12eea68 |
children |
rev | line source |
---|---|
al@19812 | 1 --- a/src/base/fm-mime-type.c |
al@19812 | 2 +++ b/src/base/fm-mime-type.c |
al@20639 | 3 @@ -165,10 +165,10 @@ |
al@19812 | 4 if(uncertain) |
al@19812 | 5 { |
al@19812 | 6 int fd, len; |
al@19812 | 7 - if(pstat->st_size == 0) /* empty file = text file with 0 characters in it. */ |
al@19812 | 8 + if(pstat->st_size == 0) /* empty file */ |
al@19812 | 9 { |
al@19812 | 10 g_free(type); |
al@19812 | 11 - return fm_mime_type_from_name("text/plain"); |
al@19812 | 12 + return fm_mime_type_from_name("application/x-zerosize"); |
al@19812 | 13 } |
al@19812 | 14 fd = open(file_path, O_RDONLY); |
al@19812 | 15 if(fd >= 0) |