From f08930c9c9ce91007c2f576c25d3f874abb96a00 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 6 Feb 2016 22:20:46 +0100 Subject: Preserve pre-change file content as tracking state Relying on `diff` for storing the pre-change content did not work out as it opens the file descriptors to soon and only reads the first block of pre-change file content until the remaining content is actually required. This obviously led to problems when tracking actually changing files. --- src/tracking/change_tracker.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/tracking/change_tracker.h') diff --git a/src/tracking/change_tracker.h b/src/tracking/change_tracker.h index e694b56..05f4021 100644 --- a/src/tracking/change_tracker.h +++ b/src/tracking/change_tracker.h @@ -1,10 +1,9 @@ #ifndef CHANGE_SRC_TRACKING_CHANGE_TRACKER_H_ #define CHANGE_SRC_TRACKING_CHANGE_TRACKER_H_ -#include #include - -#include +#include +#include #include "utility/logger.h" @@ -26,7 +25,7 @@ class ChangeTracker { std::mutex write_mutex_; std::unordered_map< - std::string, std::unique_ptr + std::string, std::unique_ptr > children_; }; -- cgit v1.2.3