From 9409f25d0de638097a806f1f75b75473be192b82 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 29 Dec 2017 16:44:24 +0100 Subject: don't add paths to files, if there is already a path that points to the same file --- src/session.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/session.h') diff --git a/src/session.h b/src/session.h index 82d9981f..7e299959 100644 --- a/src/session.h +++ b/src/session.h @@ -52,6 +52,16 @@ namespace ledger { class xact_t; +struct ComparePaths +{ + bool operator()(const path& p1, const path& p2) const + { + return p1 < p2 && !boost::filesystem::equivalent(p1, p2); + } +}; + +#define COMMA , + class session_t : public symbol_scope_t { friend void set_session_context(session_t * session); @@ -143,7 +153,7 @@ public: OPTION__ (session_t, file_, // -f - std::set data_files; + std::set data_files; CTOR(session_t, file_) {} DO_(str) { if (parent->flush_on_next_data_file) { -- cgit v1.2.3