From: Brett Gordon Date: Sun, 8 Apr 2018 16:42:12 +0000 (-0400) Subject: tar: truncate existing files. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c71c1f79130cfef2f6b4c1a3782cc30df408f862;p=FUZIX.git tar: truncate existing files. --- diff --git a/Applications/util/tar.c b/Applications/util/tar.c index 68151dc1..558d5f43 100644 --- a/Applications/util/tar.c +++ b/Applications/util/tar.c @@ -576,7 +576,7 @@ static void extract(char *argv[]) continue; } /* open output file */ - outfile = open(h.name, O_CREAT | O_WRONLY); + outfile = open(h.name, O_CREAT | O_WRONLY | O_TRUNC); if (outfile < 0) { pname(); break;