[rygel] media-export: Avoid crawling $HOME
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Avoid crawling $HOME
- Date: Tue, 1 Mar 2011 19:49:16 +0000 (UTC)
commit 5a5a4a770d9274686a725826ae18a276061e551d
Author: Jens Georg <mail jensge org>
Date: Thu Feb 24 06:46:44 2011 +0100
media-export: Avoid crawling $HOME
Sometimes special directories can expand to $HOME if not defined.
.../rygel-media-export-root-container.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index 0d47bc9..4545270 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -216,7 +216,10 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
actual_uri = actual_uri.replace ("@MUSIC@", music_dir);
}
- actual_uris.add (actual_uri);
+ // protect against special directories expanding to $HOME
+ if (actual_uri != Environment.get_home_dir ()) {
+ actual_uris.add (actual_uri);
+ }
}
return actual_uris;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]