mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-21 04:52:11 +02:00
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. svn path=/trunk/; revision=7696
This commit is contained in:
parent
e449a91b98
commit
d4d876846e
@ -1,3 +1,12 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 547481 – g_data_input_stream_read_line behaves not as stated in
|
Bug 547481 – g_data_input_stream_read_line behaves not as stated in
|
||||||
|
@ -1116,12 +1116,23 @@ g_local_file_set_display_name (GFile *file,
|
|||||||
|
|
||||||
if (new_file == NULL)
|
if (new_file == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
local = G_LOCAL_FILE (file);
|
local = G_LOCAL_FILE (file);
|
||||||
new_local = G_LOCAL_FILE (new_file);
|
new_local = G_LOCAL_FILE (new_file);
|
||||||
|
|
||||||
if (!(g_lstat (new_local->filename, &statbuf) == -1 &&
|
if (g_lstat (new_local->filename, &statbuf) == -1)
|
||||||
errno == ENOENT))
|
{
|
||||||
|
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_set_error_literal (error, G_IO_ERROR,
|
||||||
G_IO_ERROR_EXISTS,
|
G_IO_ERROR_EXISTS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user