delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/07/11/03:11:51

From: cgf AT cygnus DOT com (Christopher G. Faylor)
Subject: Re: B19: cp corrupts files with lots of zeros (Win95)
11 Jul 1998 03:11:51 GMT :
Message-ID: <6o6l5n$eqr$1@cronkite.cygnus.com>
References: <237C350B0201A8C0005 DOT cygnus DOT gnu-win32 AT galahad DOT wisent DOT de>
X-Newsreader: trn 4.0-test63 (15 March 1998)

In article <237C350B0201A8C0005 DOT cygnus DOT gnu-win32 AT galahad DOT wisent DOT de>,
Vince Del Vecchio <vince DOT delvecchio AT analog DOT com> wrote:
>This seems to have been reported before in various forms, but I have
>never seen any official response and it doesn't seem to have been fixed.
>It doesn't seem to be in the FAQ.
>
>This is with b19.1 on Win95.
>
>Create a file with a lot of zeros in it.  I did this with:
>  perl -e "print qq{\0} x 20480, qq{\n}" > /tmp/mostly-empty
>Now copy it using cp
>  cp /tmp/mostly-empty /tmp/full-of-garbage
>Now compare
>  diff /tmp/mostly-empty /tmp/full-of-garbage
>Binary files /tmp/mostly-empty and /tmp/full-of-garbage differ
>
>(If it doesn't work, try again with a different second filename.
>Sometime you get lucky and it works.)
>
>This seems a bit absurd to me.  How can you rely on the tools if
>cp silently corrupts your files?
>
>The main problem seems that lseek past EOF doesn't work the same as on
>Unix (or even as on NT).  I sent in a bug report, including a patch,
>just about a year ago, but it seems to have been ignored.  (I also
>reported the HAVE_SETMODE problem with diff, among other things, which
>seems to have just been noticed again and fixed -- you'll have to excuse
>me for being a little bitter.)  You can find it by searching for "lseek"
>in the mailing list archives.

Sorry for the lack of response.  The problem with seeking past EOF
has been fixed in our development tree, which means that it may
be fixed in Sergey's coolview soon.
-- 
cgf AT cygnus DOT com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019