mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 01:33:16 +03:00
The AmigaOS rename() isn't POSIX compiant, so call remove() first.
There will be a race condition on AmigaOS if a hostlist file gets created between the remove() and rename() calls.
This commit is contained in:
parent
32cd4abfd5
commit
cf954f9494
@ -936,6 +936,9 @@ static nserror hotlist_save(const char *path)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Remove old hotlist to handle non-POSIX rename() implementations. */
|
||||
(void)remove(path);
|
||||
|
||||
/* Replace any old hotlist file with the one we just saved */
|
||||
if (rename(temp_path, path) != 0) {
|
||||
res = NSERROR_SAVE_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user