fixes from compiling code and running all the tests on NT

This commit is contained in:
Josh Coalson
2002-06-11 06:15:28 +00:00
parent a6a773b3ae
commit d57c8d31e3
12 changed files with 88 additions and 54 deletions

View File

@@ -2134,6 +2134,15 @@ FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, char **tem
(void)fclose(*tempfile);
*tempfile = 0;
#if defined _MSC_VER || defined __MINGW32__
if(unlink(filename) < 0) {
cleanup_tempfile_(tempfile, tempfilename);
*status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR;
return false;
}
#endif
/*@@@ to fully support the tempfile_path_prefix we need to update this piece to actually copy across filesystems instead of just rename(): */
if(0 != rename(*tempfilename, filename)) {
cleanup_tempfile_(tempfile, tempfilename);