[rhythmbox] file-helpers: ignore internal URI schemes in a few places
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] file-helpers: ignore internal URI schemes in a few places
- Date: Sat, 10 Oct 2009 05:23:13 +0000 (UTC)
commit f0e5604ad70945aed074aa9c5e0beb7cc2490052
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Oct 10 13:22:48 2009 +1000
file-helpers: ignore internal URI schemes in a few places
URI schemes starting with 'xrb' are internal use only, and don't
represent anything on a filesystem or that has a directory hierarchy,
so rb_uri_create_parent_dirs and rb_uri_get_filesystem_type should just
ignore them.
lib/rb-file-helpers.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/lib/rb-file-helpers.c b/lib/rb-file-helpers.c
index d9c6bac..e53ec3a 100644
--- a/lib/rb-file-helpers.c
+++ b/lib/rb-file-helpers.c
@@ -1100,6 +1100,11 @@ rb_uri_create_parent_dirs (const char *uri, GError **error)
GError *l_error = NULL;
#endif
+ /* ignore internal URI schemes */
+ if (g_str_has_prefix (uri, "xrb")) {
+ return TRUE;
+ }
+
file = g_file_new_for_uri (uri);
parent = g_file_get_parent (file);
g_object_unref (file);
@@ -1172,6 +1177,11 @@ rb_uri_get_filesystem_type (const char *uri)
char *fstype = NULL;
GError *error = NULL;
+ /* ignore our own internal URI schemes */
+ if (g_str_has_prefix (uri, "xrb")) {
+ return NULL;
+ }
+
/* if the file doesn't exist, walk up the directory structure
* until we find something that does.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]