On 10/03/13 01:30, Alex wrote: > Greetings > 1. Wget builded from Git 3be7e0 (as and official 1.14), > compiled on MinGW doesn't work properly with WARC. > wget --warc-file=1 www.google.com > Return error "Could not open temporary WARC manifest file." > Problem in warc_tempfile function with strings > if (unlink (filename) < 0) > return NULL; > In MinGW unlink() tries to remove file immediately and cause error if it > still open ( by mkstemp()). In *nix unlink() mark file to be removed after > last handle to the file is closed. > Find function, that must work as *nix unlink() in Win32 Kernel32.dll - > "DeleteFile()", but it does not remove WARC temporary files. > It is possible to do something with it? (Now just comment unlink())
It can be opened with the FILE_FLAG_DELETE_ON_CLOSE flag. gnulib has several functions already taking that into account, but none of them seem to support passing a folder. We should probably ask gnulib for a tmpfile() function which allows a folder parameter. Otherwise I think we will end up rewriting the same code.
