Skip to content

Commit 58eee27

Browse files
committed
Lessen scope, unique warning message
1 parent f3b7988 commit 58eee27

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/Widgets/ExcludeTreeView.vala

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,14 @@ public class ExcludeTreeView : Gtk.Box {
7777
};
7878

7979
chooser.select_folder.begin ((Gtk.Window) get_root (), null, (obj, res) => {
80-
File folder;
81-
8280
try {
83-
folder = chooser.select_folder.end (res);
81+
var folder = chooser.select_folder.end (res);
82+
string folder_path = folder.get_path ();
83+
if (this.path_blacklist.is_duplicate (folder_path) == false) {
84+
path_blacklist.block (folder_path);
85+
}
8486
} catch (Error err) {
85-
warning ("Failed to select folder: %s", err.message);
86-
return;
87-
}
88-
89-
string folder_path = folder.get_path ();
90-
if (this.path_blacklist.is_duplicate (folder_path) == false) {
91-
path_blacklist.block (folder_path);
87+
warning ("Failed to select excluded folder: %s", err.message);
9288
}
9389
});
9490
});

0 commit comments

Comments
 (0)