[banshee] [gio] Fix unit tests



commit d579f7ba21db4b26976fc4863a03072c13ccac7f
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Fri Mar 19 10:46:01 2010 +1100

    [gio] Fix unit tests

 .../Banshee.Gio/Banshee.IO.Gio/DemuxVfs.cs         |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/Backends/Banshee.Gio/Banshee.IO.Gio/DemuxVfs.cs b/src/Backends/Banshee.Gio/Banshee.IO.Gio/DemuxVfs.cs
index 4a347b1..752c019 100644
--- a/src/Backends/Banshee.Gio/Banshee.IO.Gio/DemuxVfs.cs
+++ b/src/Backends/Banshee.Gio/Banshee.IO.Gio/DemuxVfs.cs
@@ -40,8 +40,9 @@ namespace Banshee.IO.Gio
         public DemuxVfs (string path)
         {
             file = path.StartsWith ("/") ? FileFactory.NewForPath (path) : FileFactory.NewForUri (path);
-            if (file.Exists) {
-                using (var info = file.QueryInfo ("etag::value,access::can-read,access::can-write", FileQueryInfoFlags.None, null)) {
+            var f = file.Exists ? file : file.Parent;
+            if (f.Exists) {
+                using (var info = f.QueryInfo ("etag::value,access::can-read,access::can-write", FileQueryInfoFlags.None, null)) {
                     IsReadable = info.GetAttributeBoolean ("access::can-read");
                     IsWritable = info.GetAttributeBoolean ("access::can-write");
                 }



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