From e1730024c7d99f8dff48b4ddba3e971f0b73293f Mon Sep 17 00:00:00 2001 From: ishmal Date: Wed, 15 Nov 2006 15:32:13 +0000 Subject: [PATCH] Fix non-basenames --- src/dom/uri.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp index ff5e91ff8..6db803134 100644 --- a/src/dom/uri.cpp +++ b/src/dom/uri.cpp @@ -332,13 +332,15 @@ URI URI::resolve(const URI &other) const } else { - unsigned int pos = path.rfind('/'); + unsigned int pos = path.find_last_of('/'); if (pos != path.npos) { DOMString tpath = path.substr(0, pos+1); tpath.append(other.path); newUri.path = tpath; } + else + newUri.path = other.path; } } -- 2.30.2