summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Util.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-03-14 14:42:43 -0230
committerDwayne Boone <dwayne@zeroc.com>2008-03-14 14:42:43 -0230
commit513047b8dfe237417ef7efda4236f8484e0958be (patch)
treecad31ff411fd3bf0af5e37439593d49bb2fed4eb /cpp/src/Slice/Util.cpp
parentAnother fix for 2789 (diff)
downloadice-513047b8dfe237417ef7efda4236f8484e0958be.tar.bz2
ice-513047b8dfe237417ef7efda4236f8484e0958be.tar.xz
ice-513047b8dfe237417ef7efda4236f8484e0958be.zip
Remove "/./" in normalizePath()
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r--cpp/src/Slice/Util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp
index 663a0ef952a..470821a68b3 100644
--- a/cpp/src/Slice/Util.cpp
+++ b/cpp/src/Slice/Util.cpp
@@ -63,6 +63,11 @@ Slice::normalizePath(const string& path, bool removeDriveLetter)
result.replace(pos, 2, "/");
}
pos = 0;
+ while((pos = result.find("/./", pos)) != string::npos)
+ {
+ result.erase(pos, 2);
+ }
+ pos = 0;
while((pos = result.find("/..", pos)) != string::npos)
{
string::size_type last = result.find_last_of("/", pos - 1);