[gvfs] cdda: Remove leading '/' from the filenames



commit 51ad0a98b0834fc7755e26ded721604ac890e8ff
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 14 11:37:33 2013 +0100

    cdda: Remove leading '/' from the filenames
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695835

 daemon/gvfsbackendcdda.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendcdda.c b/daemon/gvfsbackendcdda.c
index 82040da..11c6aea 100644
--- a/daemon/gvfsbackendcdda.c
+++ b/daemon/gvfsbackendcdda.c
@@ -999,9 +999,17 @@ do_query_info (GVfsBackend *backend,
     }
   else
     {
-      g_file_info_set_name (info, filename);
-      g_file_info_set_display_name (info, filename);
-      
+      if (*filename == '/')
+        {
+          g_file_info_set_name (info, filename + 1);
+          g_file_info_set_display_name (info, filename + 1);
+        }
+      else
+        {
+          g_file_info_set_name (info, filename);
+          g_file_info_set_display_name (info, filename);
+        }
+
       track_num = get_track_num_from_name (filename);
       if (track_num == -1)
         {


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