From e64dcdb6c95fa2ed4d52321e66af856f043fab9b Mon Sep 17 00:00:00 2001 From: ishmal Date: Thu, 29 Mar 2007 22:51:30 +0000 Subject: [PATCH] Fix native path for iri --- src/dom/uri.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp index d2b8be66a..1747f42f9 100644 --- a/src/dom/uri.cpp +++ b/src/dom/uri.cpp @@ -263,26 +263,27 @@ DOMString URI::getPath() const DOMString URI::getNativePath() const { + DOMString pathStr = toStr(path); DOMString npath; #ifdef __WIN32__ unsigned int firstChar = 0; - if (path.size() >= 3) + if (pathStr.size() >= 3) { - if (path[0] == '/' && - isLetter(path[1]) && - path[2] == ':') + if (pathStr[0] == '/' && + isLetter(pathStr[1]) && + pathStr[2] == ':') firstChar++; } - for (unsigned int i=firstChar ; i= 0) { newUri.path.clear(); - //# append my path up to the / - for (int i = 0; i