rhythmbox r6146 - in trunk: . lib
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6146 - in trunk: . lib
- Date: Fri, 6 Feb 2009 03:55:35 +0000 (UTC)
Author: jmatthew
Date: Fri Feb 6 03:55:35 2009
New Revision: 6146
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6146&view=rev
Log:
2009-02-06 Jonathan Matthew <jonathan d14n org>
* lib/rb-file-helpers.c: (rb_uri_append_uri):
Stop pretending we can chop up URIs without dealing with escaping.
Instead, use a temporary GFile to extract the path we're appending.
Makes loading of playlists from generic player devices work.
Modified:
trunk/ChangeLog
trunk/lib/rb-file-helpers.c
Modified: trunk/lib/rb-file-helpers.c
==============================================================================
--- trunk/lib/rb-file-helpers.c (original)
+++ trunk/lib/rb-file-helpers.c Fri Feb 6 03:55:35 2009
@@ -252,33 +252,6 @@
}
static gboolean
-is_valid_scheme_character (char c)
-{
- return g_ascii_isalnum (c) || c == '+' || c == '-' || c == '.';
-}
-
-
-
-
-static gboolean
-has_valid_scheme (const char *uri)
-{
- const char *p;
-
- p = uri;
-
- if (!is_valid_scheme_character (*p)) {
- return FALSE;
- }
-
- do {
- p++;
- } while (is_valid_scheme_character (*p));
-
- return *p == ':';
-}
-
-static gboolean
get_uri_perm (const char *uri, const char *perm_attribute)
{
GFile *f;
@@ -749,14 +722,17 @@
char*
rb_uri_append_uri (const char *uri, const char *fragment)
{
- /* skip scheme component of the fragment */
- if (has_valid_scheme (fragment)) {
- while (is_valid_scheme_character (*fragment))
- fragment++;
- }
- fragment++;
+ char *path;
+ char *rv;
+ GFile *f = g_file_new_for_uri (fragment);
+
+ path = g_file_get_path (f);
+
+ rv = rb_uri_append_path (uri, path);
+ g_free (path);
+ g_object_unref (f);
- return rb_uri_append_path (uri, fragment);
+ return rv;
}
char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]