glib r7696 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7696 - trunk/gio
- Date: Fri, 28 Nov 2008 08:05:49 +0000 (UTC)
Author: matthiasc
Date: Fri Nov 28 08:05:49 2008
New Revision: 7696
URL: http://svn.gnome.org/viewvc/glib?rev=7696&view=rev
Log:
Bug 548163 â Nautilus displays wrong error message for too long file
names
* glocalfile.c (g_local_file_set_display_name): Correctly set
error conditions if the new name is e.g. too long. Reported
by Leonardo Ferreira Fontenelle.
Modified:
trunk/gio/ChangeLog
trunk/gio/glocalfile.c
Modified: trunk/gio/glocalfile.c
==============================================================================
--- trunk/gio/glocalfile.c (original)
+++ trunk/gio/glocalfile.c Fri Nov 28 08:05:49 2008
@@ -1116,12 +1116,23 @@
if (new_file == NULL)
return NULL;
-
local = G_LOCAL_FILE (file);
new_local = G_LOCAL_FILE (new_file);
- if (!(g_lstat (new_local->filename, &statbuf) == -1 &&
- errno == ENOENT))
+ if (g_lstat (new_local->filename, &statbuf) == -1)
+ {
+ errsv = errno;
+
+ if (errsv != ENOENT)
+ {
+ g_set_error (error, G_IO_ERROR,
+ g_io_error_from_errno (errsv),
+ _("Error renaming file: %s"),
+ g_strerror (errsv));
+ return NULL;
+ }
+ }
+ else
{
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_EXISTS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]