mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Issue a warning if .data files remain (#3321)
This will help users realize that they have updated to an incompatible version and must export and import their tasks.
This commit is contained in:
parent
5a56cff88b
commit
8a0a98d3ef
1 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,14 @@ TDB2::TDB2 ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TDB2::open_replica (const std::string& location, bool create_if_missing)
|
||||
{
|
||||
File pending_data = File (location + "/pending.data");
|
||||
if (pending_data.exists()) {
|
||||
Color warning = Color (Context::getContext ().config.get ("color.warning"));
|
||||
std::cerr << warning.colorize (
|
||||
format ("Found existing '.data' files in {1}", location)) << "\n";
|
||||
std::cerr << " Taskwarrior's storage format changed in 3.0, requiring a manual migration.\n";
|
||||
std::cerr << " See https://github.com/GothenburgBitFactory/taskwarrior/releases.\n";
|
||||
}
|
||||
replica = tc::Replica(location, create_if_missing);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue