# HG changeset patch # User Cristi Magherusan # Date 1187039683 -10800 # Node ID c2fa3728df435255b7dcb03e67e4e05ebcbe8911 # Parent 032053ca08abb39a22f20a9fe22d99c8632b4761 URI-fication diff -r 032053ca08ab -r c2fa3728df43 src/mtp_up/mtp.c --- 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); }