comparison plugins/links/uri.cpp @ 769:565a1cef4405

Plugin links: add / if path is empty
author David Demelier <markand@malikania.fr>
date Wed, 24 Oct 2018 21:15:00 +0200
parents d8bf53170fb6
children 8c44bbcbbab9
comparison
equal deleted inserted replaced
768:d8bf53170fb6 769:565a1cef4405
74 for (auto p = hnd.pathHead; p != nullptr; p = p->next) { 74 for (auto p = hnd.pathHead; p != nullptr; p = p->next) {
75 ret.path += "/"; 75 ret.path += "/";
76 ret.path += string(p->text.first, p->text.afterLast - p->text.first); 76 ret.path += string(p->text.first, p->text.afterLast - p->text.first);
77 } 77 }
78 78
79 // Correct path if empty.
80 if (ret.path.empty())
81 ret.path = "/";
82
79 return ret; 83 return ret;
80 } 84 }
81 85
82 } // !irccd 86 } // !irccd