From 5f18e3922140c92dbf668f84ed84da3fe1e4154f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 17 Sep 2012 00:42:26 +0200 Subject: [PATCH] Don't mix up filesystem and file info --- midori/midori-download.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5