|
a/src/utils/pathut.cpp |
|
b/src/utils/pathut.cpp |
|
... |
|
... |
560 |
{
|
560 |
{
|
561 |
if (url.find("file://") == 0)
|
561 |
if (url.find("file://") == 0)
|
562 |
url = url.substr(7, string::npos);
|
562 |
url = url.substr(7, string::npos);
|
563 |
else
|
563 |
else
|
564 |
return string();
|
564 |
return string();
|
|
|
565 |
|
|
|
566 |
// Removing the fragment part. This is exclusively used when
|
|
|
567 |
// executing a viewer for the recoll manual, and we only strip the
|
|
|
568 |
// part after # if it is preceded by .html
|
565 |
string::size_type pos;
|
569 |
string::size_type pos;
|
566 |
if ((pos = url.find_last_of("#")) != string::npos) {
|
570 |
if ((pos = url.rfind(".html#")) != string::npos) {
|
567 |
url.erase(pos);
|
571 |
url.erase(pos+5);
|
|
|
572 |
} else if ((pos = url.rfind(".htm#")) != string::npos) {
|
|
|
573 |
url.erase(pos+4);
|
568 |
}
|
574 |
}
|
|
|
575 |
|
569 |
return url;
|
576 |
return url;
|
570 |
}
|
577 |
}
|
571 |
|
578 |
|
572 |
bool urlisfileurl(const string& url)
|
579 |
bool urlisfileurl(const string& url)
|
573 |
{
|
580 |
{
|