changeset 1265:7c6a443ac48b

add workaround for that vfs_fopen doesn't accept filename.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 14 Jul 2007 15:30:36 +0900
parents 5fe8289b9aed
children df2d1c5f3786
files src/m3u/m3u.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/m3u/m3u.c	Fri Jul 13 21:31:17 2007 +0200
+++ b/src/m3u/m3u.c	Sat Jul 14 15:30:36 2007 +0900
@@ -157,12 +157,15 @@
     VFSFile *file;
     Playlist *playlist = playlist_get_active();
     gchar *fn;
+    gchar *fileuri = NULL;
 
     g_return_if_fail(filename != NULL);
     g_return_if_fail(playlist != NULL);
 
-    file = vfs_fopen(filename, "wb");
-
+    fileuri = g_filename_to_uri(filename, NULL, NULL);
+    g_return_if_fail(fileuri != NULL);
+    file = vfs_fopen(fileuri, "wb");
+    g_free(fileuri); fileuri = NULL;
     g_return_if_fail(file != NULL);
 
     if (cfg.use_pl_metadata)