diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-01-27 21:51:28 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-01-27 21:51:28 +0000 |
commit | c4b66148435528ac793896c1586cc6a5ca4a6550 (patch) | |
tree | 14b0f1fb3fc4617d48e91db6962af3b234c596fb /cpp/src/slice2vb/Gen.cpp | |
parent | Use size constructor and swap instead of resize (diff) | |
download | ice-c4b66148435528ac793896c1586cc6a5ca4a6550.tar.bz2 ice-c4b66148435528ac793896c1586cc6a5ca4a6550.tar.xz ice-c4b66148435528ac793896c1586cc6a5ca4a6550.zip |
fix for path with mixed separators
Diffstat (limited to 'cpp/src/slice2vb/Gen.cpp')
-rwxr-xr-x | cpp/src/slice2vb/Gen.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp index e0c1b5bf525..07062dde0c3 100755 --- a/cpp/src/slice2vb/Gen.cpp +++ b/cpp/src/slice2vb/Gen.cpp @@ -861,11 +861,7 @@ Slice::Gen::Gen(const string& name, const string& base, const vector<string>& in string slash = cwd.find('/') == string::npos ? "\\" : "/"; free(p); - string::size_type pos = base.rfind('/'); - if(pos == string::npos) - { - pos = base.rfind('\\'); - } + string::size_type pos = base.find_last_of("/\\"); if(pos != string::npos) { string fileBase(base, pos + 1); |