From a8e46fd67298008b27fdb1fafea5c79967c0868c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 30 Jul 2020 16:16:02 +0300 Subject: GmDocument: Visit times are for absolute URLs --- src/gmdocument.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gmdocument.c b/src/gmdocument.c index 5e14c55b..0b792d56 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c @@ -208,10 +208,12 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li } } /* Check if visited. */ { - link->when = urlVisitTime_History(history_App(), absoluteUrl_String(&d->url, - &link->url)); - if (isValid_Time(&link->when)) { - link->flags |= visited_GmLinkFlag; + const iString *absUrl = absoluteUrl_String(&d->url, &link->url); + if (cmpString_String(absUrl, &d->url)) { + link->when = urlVisitTime_History(history_App(), absUrl); + if (isValid_Time(&link->when)) { + link->flags |= visited_GmLinkFlag; + } } } pushBack_PtrArray(&d->links, link); -- cgit v1.2.3