This is v2 of id:1384192538-15291-1-git-send-email-tomi.ollila@iki.fi Changes include: tidy formatting (i.e. "uncrustifying") on related code catching Xapian::Error (always) The tests done in id:m2fvr1tpkf.fsf@guru.guru-group.fi were redone with one extra (*) -- results same. Automatic tests pass. (*) $ mkdir xapian.compact $ touch xapian.compact/file $ chmod 000 xapian.compact $ notmuch compact Compacting database... compacting table postlist Error while compacting: Couldn't open base /path/to/.notmuch/xapian.compact/postlist.baseA to write: Permission denied Compaction failed: A Xapian exception occurred zsh: exit 1 ./notmuch compact