diff options
author | Dan McGee <dan@archlinux.org> | 2008-04-09 01:38:54 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-04-09 01:55:22 +0200 |
commit | 4b7f7e2a59457aa881ae883b6d102f9fc62e2ed8 (patch) | |
tree | ec123b965246d538ef8c9e6ce37f2baee81df298 /missing | |
parent | bec2ba5b4005053ce8f7048fa825ed58e3adfdc2 (diff) | |
download | pacman-4b7f7e2a59457aa881ae883b6d102f9fc62e2ed8.tar.gz pacman-4b7f7e2a59457aa881ae883b6d102f9fc62e2ed8.tar.xz |
Correctly use the fd returned my mkstemp()
There were a few issues with this code:
1. We already had an open fd to a file, but never used it to our benefit.
Use the libarchive convienence method to write the current file contents
straight to a file descriptor.
2. The real problem cropped up on Windows where the locking semantics caused
the old way of extraction to fail because we had an open file descriptor.
By using the file descriptor and closing it ASAP, we prevent these
failures.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'missing')
0 files changed, 0 insertions, 0 deletions