changeset 1491:c2fa3728df43

URI-fication
author Cristi Magherusan <majeru@atheme-project.org>
date Tue, 14 Aug 2007 00:14:43 +0300
parents 032053ca08ab
children 5a44698a302b 63144ea14b50
files src/mtp_up/mtp.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/mtp_up/mtp.c	Mon Aug 13 23:26:26 2007 +0300
+++ b/src/mtp_up/mtp.c	Tue Aug 14 00:14:43 2007 +0300
@@ -59,7 +59,8 @@
 GList * get_upload_list()
 {
     Tuple *tuple;
-    gchar *from_path;
+    gchar *from_path,*filename;
+    VFSFile*f;
     GList *node=NULL,*up_list=NULL;
     PlaylistEntry *entry;
     Playlist *current_play = playlist_get_active();
@@ -73,11 +74,15 @@
         {
             tuple = entry->tuple;
             from_path = g_strdup_printf("%s/%s", tuple_get_string(tuple, "file-path"), tuple_get_string(tuple, "file-name"));
-            VFSFile* f = vfs_fopen(from_path,"r");
+            f = vfs_fopen(from_path,"r");
             if(!vfs_is_streaming(f))
-                up_list=g_list_prepend(up_list,from_path);
+                {
+                    filename=g_filename_from_uri(from_path,NULL,NULL);
+                    up_list=g_list_prepend(up_list,filename);
+                }
             vfs_fclose(f);
             entry->selected = FALSE;
+            g_free(from_path);
         }
         node = g_list_next(node);
     }