diff options
author | Bernard Normier <bernard@zeroc.com> | 2008-05-09 10:40:09 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2008-05-09 10:40:09 -0400 |
commit | 240f2fc68b04cd5637e16811bb350267410b30fb (patch) | |
tree | e5472cb7cf3808d14c33e22487cad02009fe1cba /cpp/src/Slice/Util.cpp | |
parent | Added missing service_running.png (diff) | |
parent | Bug 3119 - no local copy of dll for projects (diff) | |
download | ice-240f2fc68b04cd5637e16811bb350267410b30fb.tar.bz2 ice-240f2fc68b04cd5637e16811bb350267410b30fb.tar.xz ice-240f2fc68b04cd5637e16811bb350267410b30fb.zip |
Merge branch 'master' of cvs:/home/git/ice
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r-- | cpp/src/Slice/Util.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 4d6be4e1834..c9d19d80572 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -93,6 +93,7 @@ Slice::fullPath(const string& path) result = string(cwdbuf) + '/' + result; } } + result = normalizePath(result); string::size_type beg = 0; @@ -115,7 +116,14 @@ Slice::fullPath(const string& path) if(len > 0) { buf[len] = '\0'; - result = normalizePath(buf) + (next != string::npos ? result.substr(next) : string()); + string linkpath = buf; + if(!isAbsolute(linkpath)) // Path relative to the location of the link + { + string::size_type pos = subpath.rfind('/'); + assert(pos != string::npos); + linkpath = subpath.substr(0, pos + 1) + linkpath; + } + result = normalizePath(linkpath) + (next != string::npos ? result.substr(next) : string()); beg = 0; next = 0; } |