wok-next view libfm/stuff/patches/empty-file.patch @ rev 19812

Up cookutils, libatasmart, libfm-extra, libfm, lxappearance, lxmenu-data, menu-cache, pcmanfm.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jul 20 05:10:04 2017 +0300 (2017-07-20)
parents
children cac2c0130f0d
line source
1 --- a/src/base/fm-mime-type.c
2 +++ b/src/base/fm-mime-type.c
3 @@ -153,10 +153,10 @@
4 if(uncertain)
5 {
6 int fd, len;
7 - if(pstat->st_size == 0) /* empty file = text file with 0 characters in it. */
8 + if(pstat->st_size == 0) /* empty file */
9 {
10 g_free(type);
11 - return fm_mime_type_from_name("text/plain");
12 + return fm_mime_type_from_name("application/x-zerosize");
13 }
14 fd = open(file_path, O_RDONLY);
15 if(fd >= 0)