[devhelp] Window: use dh_link_match_relative_url() to find equivalent local URI
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Window: use dh_link_match_relative_url() to find equivalent local URI
- Date: Wed, 6 Dec 2017 12:58:44 +0000 (UTC)
commit b2f5533bd60d268d3f03869f24d714adb46d7a1e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Dec 6 13:37:50 2017 +0100
Window: use dh_link_match_relative_url() to find equivalent local URI
And change the break into "goto out", because there are two nested for
loops. This was a recent regression caused by
commit a1b609936e69bef1af36e331d807089741a523d9.
src/dh-window.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/dh-window.c b/src/dh-window.c
index 7a3f282..913eecc 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -999,11 +999,10 @@ find_equivalent_local_uri (const gchar *uri)
for (keyword_node = keywords; keyword_node != NULL; keyword_node = keyword_node->next) {
DhLink *cur_link = keyword_node->data;
- if (g_strcmp0 (dh_link_get_file_name (cur_link), relative_url) != 0)
- continue;
-
- local_uri = dh_link_get_uri (cur_link);
- break;
+ if (dh_link_match_relative_url (cur_link, relative_url)) {
+ local_uri = dh_link_get_uri (cur_link);
+ goto out;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]