gvfs r1664 - in trunk: . daemon hal
- From: otte svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1664 - in trunk: . daemon hal
- Date: Mon, 17 Mar 2008 10:57:42 +0000 (GMT)
Author: otte
Date: Mon Mar 17 10:57:42 2008
New Revision: 1664
URL: http://svn.gnome.org/viewvc/gvfs?rev=1664&view=rev
Log:
2008-03-17 Benjamin Otte <otte gnome org>
* daemon/gvfsbackendftp.c:
return G_IO_ERROR_NOT_EMPTY if we're trying to delete a non-empty
directory.
* hal/ghalvolumemonitor.c: (get_mount_point_for_device):
remove unused variable
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendftp.c
trunk/hal/ghalvolumemonitor.c
Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c (original)
+++ trunk/daemon/gvfsbackendftp.c Mon Mar 17 10:57:42 2008
@@ -237,7 +237,8 @@
break;
case 450: /* Requested file action not taken. File unavailable (e.g., file busy). */
case 550: /* Requested action not taken. File unavailable (e.g., file not found, no access). */
- /* FIXME: This is a lot of different errors */
+ /* FIXME: This is a lot of different errors. So we have to pretend to
+ * be smart here. */
code = G_IO_ERROR_NOT_FOUND;
msg = _("File unavailable");
break;
@@ -2134,9 +2135,29 @@
RESPONSE_PASS_500,
"DELE %s", file);
if (STATUS_GROUP (response) == 5)
- ftp_connection_send (conn,
- 0,
- "RMD %s", file);
+ {
+ response = ftp_connection_send (conn,
+ RESPONSE_PASS_500,
+ "RMD %s", file);
+ if (response == 550)
+ {
+ const GList *files = enumerate_directory (ftp, conn, file, FALSE);
+ if (files)
+ {
+ g_static_rw_lock_reader_unlock (&ftp->directory_cache_lock);
+ g_set_error (&conn->error,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_EMPTY,
+ "%s", g_strerror (ENOTEMPTY));
+ }
+ else
+ ftp_connection_set_error_from_response (conn, response);
+ }
+ else if (STATUS_GROUP (response) == 5)
+ {
+ ftp_connection_set_error_from_response (conn, response);
+ }
+ }
gvfs_backend_ftp_purge_cache_of_file (ftp, conn, file);
g_free (file);
Modified: trunk/hal/ghalvolumemonitor.c
==============================================================================
--- trunk/hal/ghalvolumemonitor.c (original)
+++ trunk/hal/ghalvolumemonitor.c Mon Mar 17 10:57:42 2008
@@ -801,7 +801,6 @@
get_mount_point_for_device (HalDevice *d, GList *fstab_mount_points)
{
GList *l;
- gboolean ret;
const char *device_file;
const char *device_mount_point;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]