From 2b882605317fd3f00b76068dde7479f34bfc4a74 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 20 Mar 2016 01:40:29 +0100 Subject: [PATCH] CmdPurge: Require GC run prior to execution Since TDB2::purge method allows purging of the tasks only on competed.data file, we need to make sure that all the tasks that were supposed to be moved to completed.data have been moved - in other words, we need to run GC. This allows for diract usage of purge after delete, that is: $ task delete $ task purge working as expected. --- src/commands/CmdPurge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/CmdPurge.cpp b/src/commands/CmdPurge.cpp index 2156e9777..12cf14c3a 100644 --- a/src/commands/CmdPurge.cpp +++ b/src/commands/CmdPurge.cpp @@ -42,7 +42,7 @@ CmdPurge::CmdPurge () _read_only = false; _displays_id = false; _needs_confirm = true; - _needs_gc = false; + _needs_gc = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false;