g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
_("Error setting extended attribute '%s': %s"),
- escaped_attribute, g_strerror (errno));
+ escaped_attribute, g_strerror (errsv));
return FALSE;
}
res = g_lstat (path, &statbuf);
if (res == -1)
{
+ int errsv = errno;
+
g_object_unref (info);
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error stating file '%s': %s"),
- path, g_strerror (errno));
+ path, g_strerror (errsv));
return NULL;
}
if (fstat (fd, &stat_buf) == -1)
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error stating file descriptor: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return NULL;
}
if (g_chmod (filename, val) == -1)
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting permissions: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
return TRUE;
if (res == -1)
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting owner: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
return TRUE;
if (g_lstat (filename, &statbuf))
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting symlink: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
if (g_unlink (filename))
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting symlink: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
if (symlink (filename, val) != 0)
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting symlink: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
res = utimes (filename, times);
if (res == -1)
{
+ int errsv = errno;
+
g_set_error (error, G_IO_ERROR,
- g_io_error_from_errno (errno),
+ g_io_error_from_errno (errsv),
_("Error setting owner: %s"),
- g_strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
return TRUE;