Commit 2190ac70 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Disable auto archive if you leave the archive_filename option blank.

(Note that commenting/omitting archive_filename will still by default
write the archived entries to done.txt).

This addresses issue #42.
parent 647cf77a
...@@ -203,7 +203,10 @@ class CLIApplicationBase(object): ...@@ -203,7 +203,10 @@ class CLIApplicationBase(object):
completed. It will do some maintenance and write out the final result completed. It will do some maintenance and write out the final result
to the todo.txt file. to the todo.txt file.
""" """
if self.todolist.is_dirty():
# do not archive when the value of the filename is an empty string
# (i.e. explicitly left empty in the configuration
if self.todolist.is_dirty() and config().archive():
self._archive() self._archive()
if config().keep_sorted(): if config().keep_sorted():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment