[rygel] core: Non-native files are not writable



commit 8d2f2a08f3e0e2229a52d6f6c28bf0cb2dbcb882
Author: Jens Georg <mail jensge org>
Date:   Thu May 19 16:22:42 2011 +0200

    core: Non-native files are not writable

 src/rygel/rygel-media-object.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-media-object.vala b/src/rygel/rygel-media-object.vala
index ff3ab06..357f45d 100644
--- a/src/rygel/rygel-media-object.vala
+++ b/src/rygel/rygel-media-object.vala
@@ -180,6 +180,10 @@ public abstract class Rygel.MediaObject : GLib.Object {
 
     private async bool check_writable (File file, Cancellable? cancellable)
                                        throws Error {
+        if (!file.is_native ()) {
+            return false;
+        }
+
         try {
             var info = yield file.query_info_async (
                     FILE_ATTRIBUTE_ACCESS_CAN_WRITE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]