[baobab/import-export: 9/9] scanner: Add also regular files to the result tree
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/import-export: 9/9] scanner: Add also regular files to the result tree
- Date: Tue, 11 Sep 2012 16:57:24 +0000 (UTC)
commit 321c97d23a4e425535c22bbb6388f753e682bb0f
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sun Sep 9 16:52:44 2012 +0200
scanner: Add also regular files to the result tree
src/baobab-scanner.vala | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 2916c87..c9cecd1 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -207,11 +207,19 @@ namespace Baobab {
}
}
- results.size += child_info.get_size ();
+ var child_results = new Results ();
+ child_results.display_name = child_info.get_display_name ();
+ child_results.parse_name = child_results.display_name; // FIXME
+ child_results.parent = results;
+ child_results.size = child_info.get_size ();
+
+ results.size += child_results.size;
if (child_info.has_attribute (FileAttribute.STANDARD_ALLOCATED_SIZE)) {
- results.alloc_size += child_info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
+ child_results.alloc_size = child_info.get_attribute_uint64 (FileAttribute.STANDARD_ALLOCATED_SIZE);
+ results.alloc_size += child_results.alloc_size;
}
results.elements++;
+ results_array.results += (owned) child_results;
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]