From 5bf8feefcaae7a908f17817b67e3c78f7c28e02c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 28 Nov 2010 12:04:44 -0500 Subject: [PATCH] Shadow Files - Added a missing check for file overwrites. --- src/Context.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index 893dac89c..6f7e3f6ce 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -296,6 +296,10 @@ void Context::shadow () throw std::string ("Configuration variable 'shadow.file' is set to " "overwrite your completed tasks. Please change it."); + if (shadowFile.data == dataLocation + "/undo.data") + throw std::string ("Configuration variable 'shadow.file' is set to " + "overwrite your undo log. Please change it."); + std::string oldCurses = config.get ("curses"); std::string oldColor = config.get ("color");