[baobab] location: Update mount only if it has really changed
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] location: Update mount only if it has really changed
- Date: Tue, 2 Jun 2020 13:11:33 +0000 (UTC)
commit 7ad8386f7896df7274a607123479bf258e6c3844
Author: Stefano Facchini <stefano facchini gmail com>
Date: Tue Jun 2 14:56:01 2020 +0200
location: Update mount only if it has really changed
src/baobab-location.vala | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/baobab-location.vala b/src/baobab-location.vala
index 779a2a2..ea373a2 100644
--- a/src/baobab-location.vala
+++ b/src/baobab-location.vala
@@ -127,15 +127,18 @@ namespace Baobab {
}
public void update_volume_info () {
- mount = volume.get_mount ();
-
is_remote = volume.get_identifier (VolumeIdentifier.CLASS) == "network";
- if (mount != null) {
- fill_from_mount ();
+ var new_mount = volume.get_mount ();
+ if (new_mount != null) {
+ if (new_mount != mount) {
+ mount = new_mount;
+ fill_from_mount ();
+ }
} else {
name = volume.get_name ();
icon = volume.get_icon ();
+ mount = null;
file = null;
size = null;
used = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]