From: Timo Sirainen Date: Sun, 7 Oct 2012 21:48:55 +0000 (+0300) Subject: fts-lucene: Compile fix for previous unlink_directory() change X-Git-Tag: 2.2.alpha1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b07cb607ae8864e7784787a9db96880db1f50e52;p=thirdparty%2Fdovecot%2Fcore.git fts-lucene: Compile fix for previous unlink_directory() change --- diff --git a/src/plugins/fts-lucene/lucene-wrapper.cc b/src/plugins/fts-lucene/lucene-wrapper.cc index 76d9cb0b20..8d1f417ca6 100644 --- a/src/plugins/fts-lucene/lucene-wrapper.cc +++ b/src/plugins/fts-lucene/lucene-wrapper.cc @@ -238,7 +238,9 @@ static void lucene_handle_error(struct lucene_index *index, CLuceneError &err, err.number() == CL_ERR_IO)) { /* delete corrupted index. most IO errors are also about missing files and other such corruption.. */ - if (unlink_directory(index->path, TRUE) < 0 && errno != ENOENT) + if (unlink_directory(index->path, + UNLINK_DIRECTORY_FLAG_RMDIR) < 0 && + errno != ENOENT) i_error("unlink_directory(%s) failed: %m", index->path); rescan_clear_unseen_mailboxes(index, NULL); } @@ -361,7 +363,7 @@ static int lucene_settings_check(struct lucene_index *index) return ret; /* settings changed, rebuild index */ - if (unlink_directory(index->path, TRUE) < 0) { + if (unlink_directory(index->path, UNLINK_DIRECTORY_FLAG_RMDIR) < 0) { i_error("unlink_directory(%s) failed: %m", index->path); ret = -1; } else {