mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Improve error on win32input/output streams
This commit is contained in:
@@ -210,9 +210,12 @@ g_win32_input_stream_close (GInputStream *stream,
|
||||
{
|
||||
if (close (win32_stream->priv->fd) < 0)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR,
|
||||
g_io_error_from_errno (errno),
|
||||
g_strerror (errno));
|
||||
int errsv = errno;
|
||||
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
g_io_error_from_errno (errsv),
|
||||
_("Error closing file descriptor: %s"),
|
||||
g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@@ -197,9 +197,12 @@ g_win32_output_stream_close (GOutputStream *stream,
|
||||
{
|
||||
if (close (win32_stream->priv->fd) < 0)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR,
|
||||
g_io_error_from_errno (errno),
|
||||
g_strerror (errno));
|
||||
int errsv = errno;
|
||||
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
g_io_error_from_errno (errsv),
|
||||
_("Error closing file descriptor: %s"),
|
||||
g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user