[file] fix #948255 - print white-space in fsmagic, but only when
Jan Kaluža
jkaluza at fedoraproject.org
Mon Apr 8 10:29:16 UTC 2013
commit 4b2786b2d730f8c3e64b38e3c8baa02552f17b59
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Mon Apr 8 12:29:05 2013 +0200
fix #948255 - print white-space in fsmagic, but only when
we know there will be some more output
file-5.14-bad-fsmagic-space.patch | 13 ++++++-------
file.spec | 6 +++++-
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/file-5.14-bad-fsmagic-space.patch b/file-5.14-bad-fsmagic-space.patch
index 8875b24..354a435 100644
--- a/file-5.14-bad-fsmagic-space.patch
+++ b/file-5.14-bad-fsmagic-space.patch
@@ -1,14 +1,13 @@
diff --git a/src/fsmagic.c b/src/fsmagic.c
-index bf5f92a..fd1161d 100644
+index bf5f92a..8ad6958 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)
+@@ -367,7 +367,7 @@ 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;
- }
++ if (!mime && did && ret == 0) {
+ if (file_printf(ms, " ") == -1)
+ return -1;
+ }
diff --git a/file.spec b/file.spec
index 1474fe9..af0318c 100644
--- a/file.spec
+++ b/file.spec
@@ -3,7 +3,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.14
-Release: 3%{?dist}
+Release: 4%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -152,6 +152,10 @@ cd python
%endif
%changelog
+* Mon Apr 08 2013 Jan Kaluza <jkaluza at redhat.com> - 5.14-4
+- fix #948255 - print white-space in fsmagic, but only when
+ we know there will be some more output
+
* Fri Mar 29 2013 Jan Kaluza <jkaluza at redhat.com> - 5.14-3
- fix #928995 - do not print white-space in the end of fsmagic
More information about the scm-commits
mailing list