mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Use MSVCRT _unlink function (unlink was not setting errno)
This commit is contained in:
@@ -1104,7 +1104,7 @@ static int rename_file(const char *from_filename, const char *to_filename)
|
||||
|
||||
/* Windows rename doesn't remove the destination if it exists. */
|
||||
errno = 0;
|
||||
rc = unlink(to_filename);
|
||||
rc = _unlink(to_filename);
|
||||
if (rc == -1 && errno != ENOENT)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user