[rygel/rygel-0-30] media-export: Use allow-upload setting
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-30] media-export: Use allow-upload setting
- Date: Mon, 11 Apr 2016 16:49:00 +0000 (UTC)
commit c39e21907a5c5e7dffd7bcacd24cc69013e2361f
Author: Jens Georg <mail jensge org>
Date: Sun Apr 10 09:16:36 2016 +0200
media-export: Use allow-upload setting
If allow-upload is not set, do not use containers that can lead to file-system
modification
Signed-off-by: Jens Georg <mail jensge org>
.../rygel-media-export-object-factory.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-object-factory.vala
b/src/plugins/media-export/rygel-media-export-object-factory.vala
index cac21cf..24ebef8 100644
--- a/src/plugins/media-export/rygel-media-export-object-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-object-factory.vala
@@ -79,7 +79,16 @@ internal class Rygel.MediaExport.ObjectFactory : Object {
// to allow uploads.
// See https://bugzilla.gnome.org/show_bug.cgi?id=676379 to
// give more control over this.
- return new WritableDbContainer (id, title);
+ var allow_upload = false;
+ try {
+ allow_upload = MetaConfig.get_default ().get_allow_upload ();
+ } catch (Error error) { /* Using default */ }
+
+ if (allow_upload) {
+ return new WritableDbContainer (id, title);
+ } else {
+ return new TrackableDbContainer (id, title);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]