[gvfs] http: Get rid of unnecessary calls to uri_for_filename ()



commit bc9c779e1af4763f39e7065fb14747febad7fa8d
Author: Christian Kellner <gicmo gnome org>
Date:   Thu May 12 16:16:22 2011 +0200

    http: Get rid of unnecessary calls to uri_for_filename ()
    
    Use http_backend_get_mount_base () instead of
    http_backend_uri_for_filename () since in the http backend every unique
    URL corresponds to a new mount; we therefore don't have filenames as
    in the other backends (filename will and *must* always be "/").

 daemon/gvfsbackendhttp.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 79e3c46..e0ce128 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -390,10 +390,8 @@ try_open_for_read (GVfsBackend        *backend,
 {
   SoupURI *uri;
 
-  uri = http_backend_uri_for_filename (backend, filename, FALSE);
-
+  uri = http_backend_get_mount_base (backend);
   http_backend_open_for_read (backend, G_VFS_JOB (job), uri);
-  soup_uri_free (uri);
 
   return TRUE;
 }
@@ -691,9 +689,8 @@ try_query_info (GVfsBackend           *backend,
   SoupMessage *msg;
   SoupURI     *uri;
 
-  uri = http_backend_uri_for_filename (backend, filename, FALSE);
+  uri = http_backend_get_mount_base (backend);
   msg = soup_message_new_from_uri (SOUP_METHOD_HEAD, uri);
-  soup_uri_free (uri);
 
   http_backend_queue_message (backend, msg, query_info_ready, job);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]