Commit a06c96e5 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

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.
parent f55261c2
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment