Handle filesystems (like ntfs-3g) that return EEXIST instead of ENOTEMPTY

2008-02-26  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
        (g_local_file_delete):
	Handle filesystems (like ntfs-3g) that return EEXIST instead
	of ENOTEMPTY (#518816)


svn path=/trunk/; revision=6598
This commit is contained in:
Alexander Larsson 2008-02-27 11:16:58 +00:00 committed by Alexander Larsson
parent d01acfe811
commit f0e54fd328
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-02-26 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
(g_local_file_delete):
Handle filesystems (like ntfs-3g) that return EEXIST instead
of ENOTEMPTY (#518816)
2008-02-25 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.6 ===

View File

@ -1295,6 +1295,12 @@ g_local_file_delete (GFile *file,
{
int errsv = errno;
/* Posix allows EEXIST too, but the more sane error
is G_IO_ERROR_NOT_FOUND, and its what nautilus
expects */
if (errsv == EEXIST)
errsv = ENOTEMPTY;
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
_("Error removing file: %s"),