From: Christian Dywan Date: Sun, 16 Sep 2012 22:42:26 +0000 (+0200) Subject: Don't mix up filesystem and file info X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f18e3922140c92dbf668f84ed84da3fe1e4154f;p=midori Don't mix up filesystem and file info --- diff --git a/midori/midori-download.vala b/midori/midori-download.vala index 806496ac..64d6ddfd 100644 --- a/midori/midori-download.vala +++ b/midori/midori-download.vala @@ -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;