changeset 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 06c5a76fedd2
files plugins/links/uri.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/links/uri.cpp	Wed Oct 24 21:05:00 2018 +0200
+++ b/plugins/links/uri.cpp	Wed Oct 24 21:15:00 2018 +0200
@@ -76,6 +76,10 @@
         ret.path += string(p->text.first, p->text.afterLast - p->text.first);
     }
 
+    // Correct path if empty.
+    if (ret.path.empty())
+        ret.path = "/";
+
     return ret;
 }