Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- From: Bastien Nocera <hadess hadess net>
- To: Peter <rhythmbox-devel maubp freeserve co uk>
- Cc: rhythmbox-devel gnome org, Alexandre Rosenfeld <alexandre rosenfeld gmail com>
- Subject: Re: [Rhythmbox-devel] DACP (iTunes remote) support added
- Date: Sun, 24 Oct 2010 03:45:35 +0100
On Sun, 2010-10-24 at 01:50 +0100, Peter wrote:
>
> + if (g_ascii_strncasecmp(uri, "file://", 7) == 0) {
> + /* Need to remove file:// and unencode it, e.g. %20 to
> space */
> + cover = g_strdup(g_filename_from_uri(uri, NULL,
> NULL));
> + }
This will leak the output of g_filename_from_uri(), and it's not the way
to get the URI.
Use:
file = g_file_new_for_uri (uri);
cover = g_file_get_path (file);
g_object_unref (file);
This will make sure that SMB URIs will get a local path, through the
gvfs fuse support.
Cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]