Enhancement - consistency checks

- Reintroduced disabled (no idea why) checks that ensure that shadow
  files weren't set up to clobber authoritative task files.
This commit is contained in:
Paul Beckingham 2010-05-30 17:03:42 -04:00
parent d92e80e289
commit 24085e0960

View file

@ -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");