fix #948255 - print white-space in fsmagic, but only when

we know there will be some more output
This commit is contained in:
Jan Kaluza 2013-04-08 12:29:05 +02:00
parent a632597c99
commit 4b2786b2d7
2 changed files with 11 additions and 8 deletions

View File

@ -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;
}

View File

@ -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@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@redhat.com> - 5.14-3
- fix #928995 - do not print white-space in the end of fsmagic