diff options
author | 2015-02-21 13:51:41 -0800 | |
---|---|---|
committer | 2015-02-21 13:51:41 -0800 | |
commit | bd4eb9bd65045c50b475b8f475e780c182c5b857 (patch) | |
tree | fa07dd3e147a2541a03e54651f35cad5e4a3f47c | |
parent | Remove do_fix/--fix for now, it should be done externally to this. (diff) | |
download | backend-bd4eb9bd65045c50b475b8f475e780c182c5b857.tar.gz backend-bd4eb9bd65045c50b475b8f475e780c182c5b857.tar.bz2 backend-bd4eb9bd65045c50b475b8f475e780c182c5b857.zip |
readonly mode for processing new as well.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | ag | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -19,6 +19,7 @@ $options.name = nil $options.index_only = false $options.no_threading = false $options.debug = false +$options.readonly = false op = OptionParser.new do |opts| opts.banner = "Usage: ag <<--index-full|--index-new|--delete|--reindex|--info> <--list listname>> <maildir/file/hash/messageid> [options]" @@ -78,6 +79,10 @@ op = OptionParser.new do |opts| opts.on('--debug', 'Print debug messages') do $options.debug = true end + + opts.on('--readonly', 'Do not alter the maildir in any way') do + $options.readonly = true + end end op.parse! @@ -120,7 +125,7 @@ def do_incremental begin Ag::Storage.store($options.name, mail) - maildir_message.process + maildir_message.process unless $options.readonly rescue => e $stderr.puts "Cannot save message #{mail.message_id}: #{e.message}" next |