mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Replace creat() by g_open().
g_open is necessary to use the wide character api and creat() is equivalent to open with O_CREAT|O_WRONLY|O_TRUNC. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15413 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f1f0f8537a
commit
c59bda28a3
@ -347,7 +347,7 @@ copy_file(const char *orig, const char *bkup)
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
bkup_fd = creat(bkup, 0600);
|
bkup_fd = g_open(bkup, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0600);
|
||||||
if(bkup_fd == -1)
|
if(bkup_fd == -1)
|
||||||
{
|
{
|
||||||
close(orig_fd);
|
close(orig_fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user