mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
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:
parent
d01acfe811
commit
f0e54fd328
@ -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>
|
2008-02-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.15.6 ===
|
* === Released 2.15.6 ===
|
||||||
|
@ -1295,6 +1295,12 @@ g_local_file_delete (GFile *file,
|
|||||||
{
|
{
|
||||||
int errsv = errno;
|
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_set_error (error, G_IO_ERROR,
|
||||||
g_io_error_from_errno (errsv),
|
g_io_error_from_errno (errsv),
|
||||||
_("Error removing file: %s"),
|
_("Error removing file: %s"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user