[baobab] Report an error when location is excluded
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] Report an error when location is excluded
- Date: Thu, 2 Jul 2020 17:32:22 +0000 (UTC)
commit 306f80f6f04f8d7c9480fcdeb3f6b8538f3566d6
Author: Stefano Facchini <stefano facchini gmail com>
Date: Wed Jul 1 19:17:57 2020 +0200
Report an error when location is excluded
src/baobab-scanner.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 9f8f57a..e56765c 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -264,12 +264,16 @@ namespace Baobab {
var results_array = new ResultsArray ();
var current_unix_device = info.get_attribute_uint32 (FileAttribute.UNIX_DEVICE);
- if (directory.get_uri () in excluded_locations ||
- (ScanFlags.EXCLUDE_MOUNTS in scan_flags && current_unix_device != unix_device)) {
+ if (ScanFlags.EXCLUDE_MOUNTS in scan_flags && current_unix_device != unix_device) {
return null;
}
var results = new Results (info, parent);
+ if (directory.get_uri () in excluded_locations) {
+ results.error = new IOError.FAILED ("Location is excluded");
+ return results;
+ }
+
total_size += results.size;
total_elements++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]