mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-01 11:19:27 -05:00
- fix for windows, rename() is not posix compliant on windows.
git-svn-id: file:///svn/unbound/trunk@2605 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8cafd0e379
commit
8c2f658cd1
2 changed files with 6 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
3 February 2012: Wouter
|
||||
- fix for windows, rename() is not posix compliant on windows.
|
||||
|
||||
2 February 2012: Wouter
|
||||
- 1.4.16 release tag.
|
||||
- svn trunk is 1.4.17 in development.
|
||||
|
|
|
|||
|
|
@ -996,6 +996,9 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
|||
/* success; overwrite actual file */
|
||||
fclose(out);
|
||||
verbose(VERB_ALGO, "autotrust: replaced %s", fname);
|
||||
#ifdef UB_ON_WINDOWS
|
||||
(void)unlink(fname); /* windows does not replace file with rename() */
|
||||
#endif
|
||||
if(rename(tempf, fname) < 0) {
|
||||
log_err("rename(%s to %s): %s", tempf, fname, strerror(errno));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue