diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-09 08:52:04 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-09 08:52:04 +0200 |
commit | e1ef4d5e627bef67994cf378adf0709944224dcf (patch) | |
tree | b649506fb9a1d279be29b1e2b95c98a9506be08c /src/quickopen.c | |
parent | 7a9157a1833159194a8b5a2fd2fd66bad6440485 (diff) | |
download | experiment-player-e1ef4d5e627bef67994cf378adf0709944224dcf.tar.gz |
use g_build_filename() to construct paths so as to not require any knowledge about the path separator
* should fix windows version where filenames with both slash and backslash had been generated - those are not accepted by libvlc
Diffstat (limited to 'src/quickopen.c')
-rw-r--r-- | src/quickopen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quickopen.c b/src/quickopen.c index df37338..bacb2b0 100644 --- a/src/quickopen.c +++ b/src/quickopen.c @@ -86,8 +86,9 @@ quickopen_filter(const gchar *name) if (res) return FALSE; - trans_name = g_strconcat(quickopen_directory, "/", name, - EXPERIMENT_TRANSCRIPT_EXT, NULL); + trans_name = g_build_filename(quickopen_directory, name, NULL); + trans_name = g_realloc(trans_name, strlen(trans_name) + + sizeof(EXPERIMENT_TRANSCRIPT_EXT)); if ((p = g_strrstr(trans_name, ".")) == NULL) { g_free(trans_name); return FALSE; @@ -136,8 +137,8 @@ refresh_quickopen_menu(GtkMenu *menu) GtkWidget *item; fullnames = g_realloc(fullnames, (fullnames_n+2) * sizeof(gchar *)); - fullnames[fullnames_n] = g_strconcat(quickopen_directory, "/", - name, NULL); + fullnames[fullnames_n] = g_build_filename(quickopen_directory, + name, NULL); item_name = g_strdup(name); if ((p = g_strrstr(item_name, ".")) != NULL) |