mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 14:41:08 +00:00
* libwget/io.c: Use open() instead of creat()
open() is covered by gnulib, creat() not.
This commit is contained in:
@ -389,7 +389,7 @@ int wget_update_file(const char *fname,
|
||||
xfree(basename);
|
||||
|
||||
// create & open the lock file
|
||||
if ((lockfd = creat(lockfile, 0644)) == -1) {
|
||||
if ((lockfd = open(lockfile, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) {
|
||||
error_printf(_("Failed to create '%s' (%d)\n"), lockfile, errno);
|
||||
xfree(lockfile);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user