From e70589e47f27d179dc01412e37bd8e0b9e76227d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 3 Jan 2011 21:25:18 +0100 Subject: dpkg-split: Truncate the output file when splitting a package Use creat() instead of open() with the missing O_TRUNC. Regression introduced in f2115151c19ff37b305296c23225807b0832086b. --- dpkg-split/split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dpkg-split') diff --git a/dpkg-split/split.c b/dpkg-split/split.c index fa7533609..46262f15a 100644 --- a/dpkg-split/split.c +++ b/dpkg-split/split.c @@ -196,7 +196,7 @@ mksplit(const char *file_src, const char *prefix, size_t partsize, } /* Split the data. */ - fd_dst = open(file_dst.buf, O_CREAT | O_WRONLY, 0644); + fd_dst = creat(file_dst.buf, 0644); if (fd_dst < 0) ohshite(_("unable to open file '%s'"), file_dst.buf); -- cgit v1.2.3