]> spindle.queued.net Git - midori/commitdiff
Don't mix up filesystem and file info
authorChristian Dywan <christian@twotoasts.de>
Sun, 16 Sep 2012 22:42:26 +0000 (00:42 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 17 Sep 2012 17:26:55 +0000 (19:26 +0200)
midori/midori-download.vala

index 806496acbea75c29c11535de2532cfd7a210186c..64d6ddfde785ce6a9f507e0ee7eb0fa0eef4498e 100644 (file)
@@ -285,14 +285,16 @@ namespace Midori {
             bool can_write;
             uint64 free_space;
             try {
-                var info = folder.query_filesystem_info ("access::can-write,filesystem::free");
-                can_write = info.get_attribute_boolean ("access::can-write");
+                var info = folder.query_filesystem_info ("filesystem::free");
                 free_space = info.get_attribute_uint64 ("filesystem::free");
+                info = folder.query_info ("access::can-write", 0);
+                can_write = info.get_attribute_boolean ("access::can-write");
             }
             catch (Error error) {
                 can_write = false;
                 free_space = 0;
             }
+
             if (free_space < download.total_size || !can_write) {
                 string message;
                 string detailed_message;