mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
compact: unconditionally remove old wip database compact directory
In case previous notmuch compact has been interrupted there is old work-in-progress database compact directory partially filled. Remove it just before starting to fill the directory with new files.
This commit is contained in:
parent
cb6cc296e2
commit
6452ae0fcb
1 changed files with 6 additions and 0 deletions
|
@ -922,6 +922,12 @@ notmuch_database_compact (const char *path,
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Unconditionally attempt to remove old work-in-progress database (if
|
||||||
|
* any). This is "protected" by database lock. If this fails due to write
|
||||||
|
* errors (etc), the following code will fail and provide error message.
|
||||||
|
*/
|
||||||
|
(void) rmtree (compact_xapian_path);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NotmuchCompactor compactor (status_cb, closure);
|
NotmuchCompactor compactor (status_cb, closure);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue