mirror of https://github.com/GNOME/gimp.git
workaround for GLib bug #116617: set GimpConfigError before calling
2003-09-23 Sven Neumann <sven@gimp.org> * app/config/gimpscanner.c (gimp_scanner_new_file): workaround for GLib bug #116617: set GimpConfigError before calling g_strerror(). Fixes bug #122939.
This commit is contained in:
parent
f55261c2c1
commit
a06c96e5bc
|
@ -1,3 +1,9 @@
|
|||
2003-09-23 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/gimpscanner.c (gimp_scanner_new_file): workaround for
|
||||
GLib bug #116617: set GimpConfigError before calling g_strerror().
|
||||
Fixes bug #122939.
|
||||
|
||||
2003-09-23 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/menus.c (menus_last_opened_add): add a shortcut of
|
||||
|
|
|
@ -83,12 +83,16 @@ gimp_scanner_new_file (const gchar *filename,
|
|||
|
||||
if (fd == -1)
|
||||
{
|
||||
GimpConfigError code;
|
||||
|
||||
code = (errno == ENOENT ?
|
||||
GIMP_CONFIG_ERROR_OPEN_ENOENT : GIMP_CONFIG_ERROR_OPEN);
|
||||
|
||||
g_set_error (error,
|
||||
GIMP_CONFIG_ERROR,
|
||||
(errno == ENOENT ?
|
||||
GIMP_CONFIG_ERROR_OPEN_ENOENT : GIMP_CONFIG_ERROR_OPEN),
|
||||
GIMP_CONFIG_ERROR, code,
|
||||
_("Failed to open file: '%s': %s"),
|
||||
filename, g_strerror (errno));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,12 +83,16 @@ gimp_scanner_new_file (const gchar *filename,
|
|||
|
||||
if (fd == -1)
|
||||
{
|
||||
GimpConfigError code;
|
||||
|
||||
code = (errno == ENOENT ?
|
||||
GIMP_CONFIG_ERROR_OPEN_ENOENT : GIMP_CONFIG_ERROR_OPEN);
|
||||
|
||||
g_set_error (error,
|
||||
GIMP_CONFIG_ERROR,
|
||||
(errno == ENOENT ?
|
||||
GIMP_CONFIG_ERROR_OPEN_ENOENT : GIMP_CONFIG_ERROR_OPEN),
|
||||
GIMP_CONFIG_ERROR, code,
|
||||
_("Failed to open file: '%s': %s"),
|
||||
filename, g_strerror (errno));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue