glib r7697 - branches/glib-2-18/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7697 - branches/glib-2-18/gio
- Date: Fri, 28 Nov 2008 08:07:35 +0000 (UTC)
Author: matthiasc
Date: Fri Nov 28 08:07:35 2008
New Revision: 7697
URL: http://svn.gnome.org/viewvc/glib?rev=7697&view=rev
Log:
2008-11-28 Matthias Clasen <mclasen redhat com>
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:
branches/glib-2-18/gio/ChangeLog
branches/glib-2-18/gio/glocalfile.c
Modified: branches/glib-2-18/gio/glocalfile.c
==============================================================================
--- branches/glib-2-18/gio/glocalfile.c (original)
+++ branches/glib-2-18/gio/glocalfile.c Fri Nov 28 08:07:35 2008
@@ -1120,8 +1120,20 @@
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]