diff --git a/ChangeLog b/ChangeLog index 013739f5..2857e447 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-14 Tatsuhiro Tsujikawa + + Fixed compile error on opensolaris + * src/util.cc + 2010-11-14 Tatsuhiro Tsujikawa Don't catch Exception. diff --git a/src/util.cc b/src/util.cc index a816ab57..954ddc7b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1339,24 +1339,24 @@ bool detectDirTraversal(const std::string& s) } } - static std::string DS = "./"; - static std::string DDS = "../"; - static std::string SD = "/."; - static std::string SDD = "/.."; - static std::string SDDS = "/../"; - static std::string SDS = "/./"; - static std::string DD = ".."; + static std::string A2_DS = "./"; + static std::string A2_DDS = "../"; + static std::string A2_SD = "/."; + static std::string A2_SDD = "/.."; + static std::string A2_SDDS = "/../"; + static std::string A2_SDS = "/./"; + static std::string A2_DD = ".."; return s == A2STR::DOT_C || - s == DD || + s == A2_DD || util::startsWith(s, A2STR::SLASH_C) || - util::startsWith(s, DS) || - util::startsWith(s, DDS) || - s.find(SDDS) != std::string::npos || - s.find(SDS) != std::string::npos || + util::startsWith(s, A2_DS) || + util::startsWith(s, A2_DDS) || + s.find(A2_SDDS) != std::string::npos || + s.find(A2_SDS) != std::string::npos || util::endsWith(s, A2STR::SLASH_C) || - util::endsWith(s, SD) || - util::endsWith(s, SDD); + util::endsWith(s, A2_SD) || + util::endsWith(s, A2_SDD); } std::string escapePath(const std::string& s)