1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00
pacman/lib
Dan McGee 4b7f7e2a59 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>
2008-04-08 18:55:22 -05:00
..
libalpm Correctly use the fd returned my mkstemp() 2008-04-08 18:55:22 -05:00