# # patch "ChangeLog" # from [562c78e027298a0eb80566ee4838379923779d25] # to [dd3fa203820e5ab2ee12feb7e10dfac859f0a755] # # patch "file_io.cc" # from [88a1397797187722cf0acdd674c3d03d2b127b0d] # to [a2bdedd6068a90ec8ebf19add5145c995e878bce] # # patch "paths.cc" # from [5c88654c37c0aebb0ddcd04da582fbb95954ed52] # to [d902cf18519d9367d6f22dcc1ba7678246c01c9e] # # patch "paths.hh" # from [088b378c52d4687f4376c29a32c0174202f6b7f1] # to [ef31142a8d9a16fccafb372ada74cc8a48b4ebb6] # ======================================================================== --- ChangeLog 562c78e027298a0eb80566ee4838379923779d25 +++ ChangeLog dd3fa203820e5ab2ee12feb7e10dfac859f0a755 @@ -1,5 +1,11 @@ 2005-08-25 Nathaniel Smith + * paths.{cc,hh} (is_bookkeeping_path): New static method. + * file_io.cc (walk_tree_recursive): Use it. Now compiles. + paths.cc and file_io.cc now compile. + +2005-08-25 Nathaniel Smith + * file_io.cc (delete_dir_recursive): Implement. Misc. compile fixes. ======================================================================== --- file_io.cc 88a1397797187722cf0acdd674c3d03d2b127b0d +++ file_io.cc a2bdedd6068a90ec8ebf19add5145c995e878bce @@ -361,7 +361,7 @@ fs::path entry = *di; fs::path rel_entry = relative / entry.leaf(); - if (book_keeping_file(rel_entry)) + if (bookkeeping_path::is_bookkeeping_path(rel_entry.normalize().string())) { L(F("ignoring book keeping entry %s\n") % rel_entry.string()); continue; ======================================================================== --- paths.cc 5c88654c37c0aebb0ddcd04da582fbb95954ed52 +++ paths.cc d902cf18519d9367d6f22dcc1ba7678246c01c9e @@ -171,6 +171,12 @@ data = path; } +bool +bookkeeping_path::is_bookkeeping_path(std::string const & path) +{ + return !not_in_bookkeeping_dir(path); +} + /////////////////////////////////////////////////////////////////////////// // splitting/joining // this code must be superfast @@ -331,13 +337,13 @@ data = (working_root.get() / other.as_internal()).as_internal(); } -static inline std::string const_system_path(std::string const & path) +static inline std::string const_system_path(utf8 const & path) { - path = tilde_expand(path); - if (is_absolute(path)) - return path; + std::string expanded = tilde_expand(path)(); + if (is_absolute(expanded)) + return expanded; else - return (initial_abs_path.get() / path).as_internal(); + return (initial_abs_path.get() / expanded).as_internal(); } system_path::system_path(std::string const & path) @@ -347,7 +353,7 @@ system_path::system_path(utf8 const & path) { - data = const_system_path(path()); + data = const_system_path(path); } /////////////////////////////////////////////////////////////////////////// ======================================================================== --- paths.hh 088b378c52d4687f4376c29a32c0174202f6b7f1 +++ paths.hh ef31142a8d9a16fccafb372ada74cc8a48b4ebb6 @@ -105,6 +105,8 @@ // usually you should just use the / operator as a constructor! bookkeeping_path(std::string const & path); bookkeeping_path operator /(std::string const & to_append) const; + // exposed for the use of walk_tree + static bool is_bookkeeping_path(std::string const & path); }; extern bookkeeping_path const bookkeeping_root;