fix #928995 - do not print white-space in the end of fsmagic

This commit is contained in:
HanzZ 2013-03-29 07:46:42 +01:00
parent 7ee7ba431d
commit a632597c99
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/fsmagic.c b/src/fsmagic.c
index bf5f92a..fd1161d 100644
--- a/src/fsmagic.c
+++ b/src/fsmagic.c
@@ -367,9 +367,5 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb)
/*NOTREACHED*/
}
- if (!mime && did) {
- if (file_printf(ms, " ") == -1)
- return -1;
- }
return ret;
}

View File

@ -3,7 +3,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.14
Release: 2%{?dist}
Release: 3%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@ -19,6 +19,7 @@ Patch6: file-5.04-generic-msdos.patch
Patch7: file-5.14-x86boot.patch
Patch8: file-5.14-perl.patch
Patch9: file-5.14-elfspace.patch
Patch10: file-5.14-bad-fsmagic-space.patch
URL: http://www.darwinsys.com/file/
Requires: file-libs = %{version}-%{release}
BuildRequires: zlib-devel
@ -73,6 +74,7 @@ file(1) command.
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@ -150,6 +152,9 @@ cd python
%endif
%changelog
* Fri Mar 29 2013 Jan Kaluza <jkaluza@redhat.com> - 5.14-3
- fix #928995 - do not print white-space in the end of fsmagic
* Mon Mar 25 2013 Jan Kaluza <jkaluza@redhat.com> - 5.14-2
- fix useless space in ELF output which could break libtool