# HG changeset patch # User Aleksej Bobylev # Date 1414624882 -7200 # Node ID 2a61932b3f018a2e8381852bfe50e89ca4f21279 # Parent cce2b600b834e01f6f5dc04477a141476b8ae8fb libfm: add support of empty files (empty files not a text and not a binary, its... empty) diff -r cce2b600b834 -r 2a61932b3f01 libfm/receipt --- a/libfm/receipt Thu Oct 30 01:16:39 2014 +0200 +++ b/libfm/receipt Thu Oct 30 01:21:22 2014 +0200 @@ -25,6 +25,8 @@ # Rules to configure and make the package. compile_rules() { + patch -p0 -i $stuff/empty-file.patch + ./configure \ --sysconfdir=/etc \ $CONFIGURE_ARGS && diff -r cce2b600b834 -r 2a61932b3f01 libfm/stuff/empty-file.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libfm/stuff/empty-file.patch Thu Oct 30 01:21:22 2014 +0200 @@ -0,0 +1,15 @@ +--- src/base/fm-mime-type.c.orig ++++ src/base/fm-mime-type.c +@@ -156,10 +156,10 @@ + if(uncertain) + { + int fd, len; +- if(pstat->st_size == 0) /* empty file = text file with 0 characters in it. */ ++ if(pstat->st_size == 0) /* empty file */ + { + g_free(type); +- return fm_mime_type_from_name("text/plain"); ++ return fm_mime_type_from_name("application/x-zerosize"); + } + fd = open(file_path, O_RDONLY); + if(fd >= 0)