Bug 721576 - Gnucash can not work with files, that have russian symbols in path.

g_win32_locale_filename_from_utf8() is not only unnecessary, it does the
wrong thing.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23700 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2014-01-17 00:03:47 +00:00
parent 767a25f7a7
commit 65e6185014

View File

@ -786,38 +786,29 @@ qof_session_load_from_xml_file_v2_full(
}
else
{
/* Even though libxml2 knows how to decompress zipped files, we do it
ourself since as of version 2.9.1 it has a bug that causes it to fail
to decompress certain files.
See https://bugzilla.gnome.org/show_bug.cgi?id=712528 for more info */
gchar *filename = fbe->fullpath;
#ifdef G_OS_WIN32
filename = g_win32_locale_filename_from_utf8(fbe->fullpath);
if (filename)
{
#endif
FILE *file;
gboolean is_compressed = is_gzipped_file(filename);
file = try_gz_open(filename, "r", is_compressed, FALSE);
if (file == NULL)
{
PWARN("Unable to open file %s", filename);
retval = FALSE;
}
else
{
retval = gnc_xml_parse_fd(top_parser, file,
generic_callback, gd, book);
fclose(file);
if (is_compressed)
wait_for_gzip(file);
}
#ifdef G_OS_WIN32
g_free(filename);
}
else
retval = FALSE;
#endif
/* Even though libxml2 knows how to decompress zipped files, we
* do it ourself since as of version 2.9.1 it has a bug that
* causes it to fail to decompress certain files. See
* https://bugzilla.gnome.org/show_bug.cgi?id=712528 for more
* info.
*/
gchar *filename = fbe->fullpath;
FILE *file;
gboolean is_compressed = is_gzipped_file(filename);
file = try_gz_open(filename, "r", is_compressed, FALSE);
if (file == NULL)
{
PWARN("Unable to open file %s", filename);
retval = FALSE;
}
else
{
retval = gnc_xml_parse_fd(top_parser, file,
generic_callback, gd, book);
fclose(file);
if (is_compressed)
wait_for_gzip(file);
}
}
if (!retval)