summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dee3272)
raw | patch | inline | side by side (parent: dee3272)
author | ishmal <ishmal@users.sourceforge.net> | |
Thu, 29 Mar 2007 22:51:30 +0000 (22:51 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Thu, 29 Mar 2007 22:51:30 +0000 (22:51 +0000) |
src/dom/uri.cpp | patch | blob | history |
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index d2b8be66a9c1206c87f843af08596e1d36c6905f..1747f42f92363bfb46048b45aca722a118317a5d 100644 (file)
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
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<path.size() ; i++)
+ for (unsigned int i=firstChar ; i<pathStr.size() ; i++)
{
- XMLCh ch = (XMLCh) path[i];
+ XMLCh ch = (XMLCh) pathStr[i];
if (ch == '/')
npath.push_back((XMLCh)'\\');
else
npath.push_back(ch);
}
#else
- npath = path;
+ npath = pathStr;
#endif
return npath;
}
if (pos >= 0)
{
newUri.path.clear();
- //# append my path up to the /
- for (int i = 0; i<pos+1 ; i++)
+ //# append my path up to and including the '/'
+ for (int i = 0; i<=pos ; i++)
newUri.path.push_back(path[i]);
//# append other path
for (unsigned int i = 0; i<other.path.size() ; i++)