From 6607e0ccac70a5cb7f770a528d7bc5424463502f Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 2 Oct 2012 15:15:59 -0400 Subject: [PATCH 1/1] still not right. works for basic stuff, fails for large hierarchies. --- nucleus/library/filesystem/directory_tree.cpp | 2 +- nucleus/library/filesystem/heavy_file_ops.cpp | 12 +++++------- octopi/library/tentacles/recursive_file_copy.cpp | 2 ++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nucleus/library/filesystem/directory_tree.cpp b/nucleus/library/filesystem/directory_tree.cpp index bf554db1..c9354f8b 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 diff --git a/nucleus/library/filesystem/heavy_file_ops.cpp b/nucleus/library/filesystem/heavy_file_ops.cpp index 05da6a99..9a5451b7 100644 --- a/nucleus/library/filesystem/heavy_file_ops.cpp +++ b/nucleus/library/filesystem/heavy_file_ops.cpp @@ -27,16 +27,12 @@ using namespace structures; namespace filesystem { -#define DEBUG_HEAVY_FILE_OPS +//#define DEBUG_HEAVY_FILE_OPS // uncomment for noisier debugging. #undef LOG -#ifdef DEBUG_HEAVY_FILE_OPS - #include - #define LOG(to_print) printf("%s::%s: %s\n", static_class_name(), func, astring(to_print).s()) -#else - #define LOG(s) {if(!!s){}} -#endif +#include +#define LOG(to_print) printf("%s::%s: %s\n", static_class_name(), func, astring(to_print).s()) ////////////// @@ -290,7 +286,9 @@ outcome heavy_file_operations::buffer_files(const astring &source_root, if (last_action._byte_start + last_action._length >= current.length()) { // this file is done now. go to the next one. +#ifdef DEBUG_HEAVY_FILE_OPS LOG(astring("finished stuffing file: ") + full_file); +#endif to_return = advance(to_transfer, last_action); if (to_return != OKAY) break; continue; diff --git a/octopi/library/tentacles/recursive_file_copy.cpp b/octopi/library/tentacles/recursive_file_copy.cpp index 0b33269f..baf40fe7 100644 --- a/octopi/library/tentacles/recursive_file_copy.cpp +++ b/octopi/library/tentacles/recursive_file_copy.cpp @@ -29,6 +29,7 @@ #include #include #include +#include using namespace application; using namespace basis; @@ -36,6 +37,7 @@ using namespace filesystem; using namespace loggers; using namespace structures; using namespace textual; +using namespace timely; namespace octopi { -- 2.34.1