mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-22 23:29:16 +02:00
Preserve errno when using g_set_error with _() and g_strerror()
This commit is contained in:
parent
80cfd099f3
commit
1cbdd2495d
@ -303,7 +303,7 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file,
|
|||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR,
|
g_set_error (error, G_IO_ERROR,
|
||||||
g_io_error_from_errno (errno),
|
g_io_error_from_errno (errsv),
|
||||||
_("Error renaming temporary file: %s"),
|
_("Error renaming temporary file: %s"),
|
||||||
g_strerror (errsv));
|
g_strerror (errsv));
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
@ -1462,11 +1462,12 @@ make_pipe (gint p[2],
|
|||||||
{
|
{
|
||||||
if (pipe (p) < 0)
|
if (pipe (p) < 0)
|
||||||
{
|
{
|
||||||
|
gint errsv = errno;
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_SPAWN_ERROR,
|
G_SPAWN_ERROR,
|
||||||
G_SPAWN_ERROR_FAILED,
|
G_SPAWN_ERROR_FAILED,
|
||||||
_("Failed to create pipe for communicating with child process (%s)"),
|
_("Failed to create pipe for communicating with child process (%s)"),
|
||||||
g_strerror (errno));
|
g_strerror (errsv));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user