diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-02 11:34:16 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-02 11:34:16 +0000 |
commit | 474ec67beabdb612c633d35fd9562b349aa74b7a (patch) | |
tree | 2a3f2036f3269538b73dcec6492be6cb097ef3df /cpp/src/IcePatch/FileLocator.cpp | |
parent | minor (diff) | |
download | ice-474ec67beabdb612c633d35fd9562b349aa74b7a.tar.bz2 ice-474ec67beabdb612c633d35fd9562b349aa74b7a.tar.xz ice-474ec67beabdb612c633d35fd9562b349aa74b7a.zip |
more IcePatch work
Diffstat (limited to 'cpp/src/IcePatch/FileLocator.cpp')
-rw-r--r-- | cpp/src/IcePatch/FileLocator.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cpp/src/IcePatch/FileLocator.cpp b/cpp/src/IcePatch/FileLocator.cpp index 329cec2ce98..1a1e5b25826 100644 --- a/cpp/src/IcePatch/FileLocator.cpp +++ b/cpp/src/IcePatch/FileLocator.cpp @@ -35,11 +35,6 @@ IcePatch::FileLocator::locate(const ObjectAdapterPtr& adapter, const Current& cu return 0; } - if(path == ".") - { - return 0; - } - if(path[0] == '/') // Example: /usr/mail/foo { return 0; @@ -47,7 +42,7 @@ IcePatch::FileLocator::locate(const ObjectAdapterPtr& adapter, const Current& cu // // Note: We could make the following rule more selective, to allow - // names such as "...foo". But since such names are rather + // names such as "foo..bar". But since such names are rather // uncommon, we disallow ".." altogether, to be on the safe side. // if(path.find("..") != string::npos) // Example: foo/../.. @@ -55,7 +50,7 @@ IcePatch::FileLocator::locate(const ObjectAdapterPtr& adapter, const Current& cu return 0; } - if(path.find(':') == 1) // Example: c:\blah + if(path.size() >= 2 && tolower(path[0]) >= 'a' && tolower(path[0]) <= 'z' && path[1] == ':') // Example: c:\blah { return 0; } |