summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefano Facchini <stefano.facchini@gmail.com>2020-06-10 23:25:11 +0200
committerStefano Facchini <stefano.facchini@gmail.com>2020-06-12 12:14:41 +0200
commit7269048f17dd530a490110ac5585fb8c371e5878 (patch)
tree5acebc2fefc95484b44efabbd095e207ceabdeab /src
parent7a5760b74fb400d38be169bf490bcdf3e8561299 (diff)
downloadbaobab-7269048f17dd530a490110ac5585fb8c371e5878.tar.gz
Remove redundant check
We already check for volume != null in the mount_volume method.
Diffstat (limited to 'src')
-rw-r--r--src/baobab-window.vala20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index ab306cb..072a9d2 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -245,18 +245,14 @@ namespace Baobab {
void on_scan_location_activate (Location location) {
set_active_location (location);
- if (location.volume != null) {
- location.mount_volume.begin ((location_, res) => {
- try {
- location.mount_volume.end (res);
- scan_active_location (false);
- } catch (Error e) {
- message (_("Could not analyze volume."), e.message, Gtk.MessageType.ERROR);
- }
- });
- } else {
- scan_active_location (false);
- }
+ location.mount_volume.begin ((location_, res) => {
+ try {
+ location.mount_volume.end (res);
+ scan_active_location (false);
+ } catch (Error e) {
+ message (_("Could not analyze volume."), e.message, Gtk.MessageType.ERROR);
+ }
+ });
}
void on_reload_activate () {