# # patch "ChangeLog" # from [2ccc53103b02bcd4d06ba6a1e33a91930cec2cc9] # to [b4e81cc77078919495f452d3762e40df9c4d9b22] # # patch "paths.cc" # from [26464ca4b80695e425d29baf3a9d968da57e84a9] # to [f59d66341f75e54a1e6b2366a1c93673d04cc7cc] # ======================================================================== --- ChangeLog 2ccc53103b02bcd4d06ba6a1e33a91930cec2cc9 +++ ChangeLog b4e81cc77078919495f452d3762e40df9c4d9b22 @@ -1,5 +1,11 @@ 2005-08-25 Nathaniel Smith + * paths.cc (in_bookkeeping_dir): Last change didn't work out so + well; let's remove some negatives and see if I can understand what + the code does this way... + +2005-08-25 Nathaniel Smith + * paths.cc (not_in_bookkeeping_dir): Handle "MT" case. Update tests to make sure it sticks... ======================================================================== --- paths.cc 26464ca4b80695e425d29baf3a9d968da57e84a9 +++ paths.cc f59d66341f75e54a1e6b2366a1c93673d04cc7cc @@ -142,9 +142,9 @@ } static inline bool -not_in_bookkeeping_dir(std::string const & path) +in_bookkeeping_dir(std::string const & path) { - return (path.size() < 3 && path != "MT") || (path.substr(0, 3) != "MT/"); + return path == "MT" || (path.size() >= 3 && (path.substr(0, 3) == "MT/")); } file_path::file_path(file_path::source_type type, std::string const & path) @@ -161,20 +161,20 @@ data = utf8(tmp.string()); } I(fully_normalized_path(data())); - I(not_in_bookkeeping_dir(data())); + I(!in_bookkeeping_dir(data())); } bookkeeping_path::bookkeeping_path(std::string const & path) { I(fully_normalized_path(path)); - I(!not_in_bookkeeping_dir(path)); + I(in_bookkeeping_dir(path)); data = path; } bool bookkeeping_path::is_bookkeeping_path(std::string const & path) { - return !not_in_bookkeeping_dir(path); + return in_bookkeeping_dir(path); } ///////////////////////////////////////////////////////////////////////////