wok view libfm/stuff/empty-file.patch @ rev 23975

Up matio (1.5.18), mutt (1.14.7), nasm (2.15.05), net-snmp (5.9), nethack (3.6.6)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 28 17:24:13 2020 +0000 (2020-10-28)
parents
children
line source
1 --- src/base/fm-mime-type.c.orig
2 +++ src/base/fm-mime-type.c
3 @@ -156,10 +156,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)