X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Ffilesystem%2Fdirectory_tree.cpp;h=68b82b7fc7d3cdbf41e27182acf178596f6a0d86;hb=51d71c226be424b6a698c7474d237e8c69661af5;hp=b6742e936e2a25434ed29f09a31a27b9ebe2ca47;hpb=cdf68a53cff76449796a3aa0222e2d0afff97c7c;p=feisty_meow.git diff --git a/nucleus/library/filesystem/directory_tree.cpp b/nucleus/library/filesystem/directory_tree.cpp index b6742e93..68b82b7f 100644 --- a/nucleus/library/filesystem/directory_tree.cpp +++ b/nucleus/library/filesystem/directory_tree.cpp @@ -34,7 +34,7 @@ using namespace nodes; using namespace structures; using namespace textual; -//#define DEBUG_DIRECTORY_TREE +#define DEBUG_DIRECTORY_TREE // uncomment for noisier version. #undef LOG @@ -224,12 +224,18 @@ void directory_tree::traverse(const astring &path, const char *pattern, bool directory_tree::reset(const astring &path, const char *pattern) { + FUNCDEF("reset"); _scanned_okay = false; WHACK(_real_tree); +// filename temp_path(path); +// temp_path.canonicalize(); *_path = path; +//temp_path.raw(); *_pattern = pattern; _real_tree = new filename_tree; +LOG(astring("dirtree::reset to path: ") + path); + // check that the top-level is healthy. directory curr(path, "*"); if (!curr.good()) return false; @@ -617,6 +623,11 @@ bool directory_tree::compare_trees(const directory_tree &source, if (target_start.raw().t()) { corresponding_name = filename(target_start.raw() + filename::default_separator() + corresponding_name.raw()); +/*doesn't help, not right yet. } else { + // if they didn't give us a place to start, we start at the top. + corresponding_name = filename(target.path() + + filename::default_separator() + corresponding_name.raw()); +*/ } #ifdef DEBUG_DIRECTORY_TREE LOG(astring("target with start is: ") + corresponding_name);