mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -06:00
MSVC compatibility: Somehow fdopen() doesn't work during the trace file initialization. Use fopen() instead.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18775 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
961539fc7c
commit
b041e5dddf
@ -158,8 +158,14 @@ qof_log_init_filename(const gchar* log_filename)
|
||||
|
||||
if ((fd = g_mkstemp(fname)) != -1)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
/* MSVC compiler: Somehow the OS thinks file descriptor from above
|
||||
* still isn't open. So we open normally with the file name and that's it. */
|
||||
fout = g_fopen(fname, "wb");
|
||||
#else
|
||||
g_rename(fname, log_filename);
|
||||
fout = fdopen(fd, "w");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user