From 24085e0960da9e9b14cd97d89ec4d614e0e4cb52 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 30 May 2010 17:03:42 -0400 Subject: [PATCH] Enhancement - consistency checks - Reintroduced disabled (no idea why) checks that ensure that shadow files weren't set up to clobber authoritative task files. --- src/Context.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index bee94fa5d..844913354 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -272,17 +272,15 @@ void Context::shadow () { inShadow = true; // Prevents recursion in case shadow command writes. - // TODO Reinstate these checks. -/* // Check for silly shadow file settings. - if (shadowFile == dataLocation + "/pending.data") + std::string dataLocation = config.get ("data.location"); + if (shadowFile.data == dataLocation + "/pending.data") throw std::string ("Configuration variable 'shadow.file' is set to " "overwrite your pending tasks. Please change it."); - if (shadowFile == dataLocation + "/completed.data") + if (shadowFile.data == dataLocation + "/completed.data") throw std::string ("Configuration variable 'shadow.file' is set to " "overwrite your completed tasks. Please change it."); -*/ std::string oldCurses = config.get ("curses"); std::string oldColor = config.get ("color");