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:
Andreas Köhler 2007-01-21 22:30:57 +00:00
parent f1f0f8537a
commit c59bda28a3

View File

@ -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);