From: Paul Eggert Date: Mon, 11 Jul 2005 18:30:02 +0000 (+0000) Subject: (wipefile): Always use binary mode. Clearly this X-Git-Tag: CPPI-1_12~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdc138f474c9ba15b948096a5d17918c712237ed;p=thirdparty%2Fcoreutils.git (wipefile): Always use binary mode. Clearly this never worked right on DOS! --- diff --git a/src/shred.c b/src/shred.c index 8a1d114bd2..ebe6e06ea7 100644 --- a/src/shred.c +++ b/src/shred.c @@ -1442,11 +1442,11 @@ wipefile (char *name, char const *qname, bool ok; int fd; - fd = open (name, O_WRONLY | O_NOCTTY); + fd = open (name, O_WRONLY | O_NOCTTY | O_BINARY); if (fd < 0 && (errno == EACCES && flags->force) && chmod (name, S_IWUSR) == 0) - fd = open (name, O_WRONLY | O_NOCTTY); + fd = open (name, O_WRONLY | O_NOCTTY | O_BINARY); if (fd < 0) { error (0, errno, _("%s: failed to open for writing"), qname);