aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/UriUtil.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/UriUtil.cxx')
-rw-r--r--src/util/UriUtil.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx
index 89d2a473a..174c977e1 100644
--- a/src/util/UriUtil.cxx
+++ b/src/util/UriUtil.cxx
@@ -42,7 +42,8 @@ const char *
uri_get_suffix(const char *uri)
{
const char *suffix = strrchr(uri, '.');
- if (suffix == nullptr)
+ if (suffix == nullptr || suffix == uri ||
+ suffix[-1] == '/' || suffix[-1] == '\\')
return nullptr;
++suffix;