aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_save.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/playlist_save.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/playlist_save.c b/src/playlist_save.c
index 054ba73f4..0913fcd09 100644
--- a/src/playlist_save.c
+++ b/src/playlist_save.c
@@ -36,27 +36,26 @@ playlist_print_song(FILE *file, const struct song *song)
g_free(path);
}
} else {
- char *uri = song_get_uri(song);
- char tmp2[MPD_PATH_MAX];
+ char *uri = song_get_uri(song), *uri_fs;
- utf8_to_fs_charset(tmp2, uri);
+ uri_fs = utf8_to_fs_charset(uri);
g_free(uri);
- fprintf(file, "%s\n", uri);
+ fprintf(file, "%s\n", uri_fs);
+ g_free(uri_fs);
}
}
void
playlist_print_uri(FILE *file, const char *uri)
{
- char tmp[MPD_PATH_MAX];
char *s;
if (playlist_saveAbsolutePaths && !uri_has_scheme(uri) &&
uri[0] != '/')
s = map_uri_fs(uri);
else
- s = g_strdup(utf8_to_fs_charset(tmp, uri));
+ s = utf8_to_fs_charset(uri);
if (s != NULL) {
fprintf(file, "%s\n", s);