Don't mix up filesystem and file info
This commit is contained in:
parent
0da919f4d9
commit
5f18e39221
1 changed files with 4 additions and 2 deletions
|
@ -285,14 +285,16 @@ namespace Midori {
|
||||||
bool can_write;
|
bool can_write;
|
||||||
uint64 free_space;
|
uint64 free_space;
|
||||||
try {
|
try {
|
||||||
var info = folder.query_filesystem_info ("access::can-write,filesystem::free");
|
var info = folder.query_filesystem_info ("filesystem::free");
|
||||||
can_write = info.get_attribute_boolean ("access::can-write");
|
|
||||||
free_space = info.get_attribute_uint64 ("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) {
|
catch (Error error) {
|
||||||
can_write = false;
|
can_write = false;
|
||||||
free_space = 0;
|
free_space = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (free_space < download.total_size || !can_write) {
|
if (free_space < download.total_size || !can_write) {
|
||||||
string message;
|
string message;
|
||||||
string detailed_message;
|
string detailed_message;
|
||||||
|
|
Loading…
Reference in a new issue