Code

Fix non-basenames
authorishmal <ishmal@users.sourceforge.net>
Wed, 15 Nov 2006 15:32:13 +0000 (15:32 +0000)
committerishmal <ishmal@users.sourceforge.net>
Wed, 15 Nov 2006 15:32:13 +0000 (15:32 +0000)
src/dom/uri.cpp

index ff5e91ff8180d78a84d17962024b44f0db805c09..6db803134cd15c6f94939fcc5b3e9fa25756c5d7 100644 (file)
@@ -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;
             }
         }