compress zero-sized files when -f is used(#167615)

This commit is contained in:
Peter Vrabec 2005-09-22 10:19:13 +00:00
parent 5cafba9fea
commit 67cb35c2c3
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- ncompress-4.2.4/compress42.c.zerobyteforce 2005-09-02 18:42:56.000000000 +0530
+++ ncompress-4.2.4/compress42.c 2005-09-02 18:43:55.000000000 +0530
@@ -1145,7 +1145,7 @@
if (fdout != 1 && close(fdout))
write_error();
- if (bytes_in == 0)
+ if ( (bytes_in == 0) && (force == 0 ) )
{
if (remove_ofname)
{

View File

@ -1,7 +1,7 @@
Summary: Fast compression and decompression utilities.
Name: ncompress
Version: 4.2.4
Release: 42
Release: 43
License: distributable
Group: Applications/File
Source: ftp://metalab.unc.edu/pub/Linux/utils/compress/ncompress-4.2.4.tar.Z
@ -9,6 +9,7 @@ Patch0: ncompress-4.2.4-make.patch
Patch1: ncompress-4.2.4-lfs2.patch
Patch2: ncompress-4.2.4-filenamelen.patch
Patch3: ncompress-2GB.patch
Patch4: ncompress-4.2.4-zerobyteforce.patch
BuildRequires: gcc glibc-devel fileutils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -29,6 +30,7 @@ which are compatible with the original UNIX compress utility.
%patch1 -p1 -b .lfs
%patch2 -p1 -b .filenamelen
%patch3 -p1 -b .2GB
%patch4 -p1 -b .zerobyteforce
%build
@ -67,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LZW.INFO README
%changelog
* Thu Sep 22 2005 Peter Vrabec <pvrabec@redhat.com> 4.2.4-43
- compress zero-sized files when -f is used(#167615)
* Fri Mar 18 2005 Peter Vrabec <pvrabec@redhat.com>
- rebuilt