summaryrefslogtreecommitdiff
path: root/src/audacious/main.c
diff options
context:
space:
mode:
authorBilal Akhtar <bilalakhtar@ubuntu.com>2011-01-14 09:51:41 +0300
committerBilal Akhtar <bilalakhtar@ubuntu.com>2011-01-14 09:51:41 +0300
commitb21ab567f7df082fe563bba6c7a83bd51ebe3af1 (patch)
tree3313ed06e9aeae4f62cc6cad56e7d465b3d4792a /src/audacious/main.c
parent07e574f5af231698b8bce9157fd2fee2b07c4395 (diff)
Imported Upstream version 2.4.3
Diffstat (limited to 'src/audacious/main.c')
-rw-r--r--src/audacious/main.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/audacious/main.c b/src/audacious/main.c
index 40daaba..8f671f5 100644
--- a/src/audacious/main.c
+++ b/src/audacious/main.c
@@ -33,6 +33,7 @@
#include <glib/gprintf.h>
+#include <libaudcore/audstrings.h>
#include <libaudcore/hook.h>
#include <libaudtag/audtag.h>
@@ -208,27 +209,19 @@ static void handle_cmd_line_filenames(gboolean is_running)
working = g_get_current_dir();
for (i = 0; filenames[i] != NULL; i++)
{
- gchar * utf8 = g_locale_to_utf8 (filenames[i], -1, NULL, NULL, NULL);
- if (! utf8)
- utf8 = g_strdup (filenames[i]);
+ gchar * uri;
- gchar *uri;
-
- if (strstr (utf8, "://"))
- {
- uri = utf8;
- utf8 = NULL;
- }
- else if (g_path_is_absolute (utf8))
- uri = g_filename_to_uri (utf8, NULL, NULL);
+ if (strstr (filenames[i], "://"))
+ uri = g_strdup (filenames[i]);
+ else if (g_path_is_absolute (filenames[i]))
+ uri = filename_to_uri (filenames[i]);
else
{
- gchar * absolute = g_build_filename (working, utf8, NULL);
- uri = g_filename_to_uri(absolute, NULL, NULL);
- g_free(absolute);
+ gchar * absolute = g_build_filename (working, filenames[i], NULL);
+ uri = filename_to_uri (absolute);
+ g_free (absolute);
}
-
- g_free (utf8);
+
fns = g_list_prepend(fns, uri);
}
fns = g_list_reverse(fns);