dovecot-2.1: sdbox: Fixed moving files from alt storage to prima...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Feb 1 23:34:00 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/fb659472b2a2
changeset: 14048:fb659472b2a2
user: Timo Sirainen <tss at iki.fi>
date: Wed Feb 01 23:33:51 2012 +0200
description:
sdbox: Fixed moving files from alt storage to primary storage.
diffstat:
src/lib-storage/index/dbox-single/sdbox-sync.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r b82a3149f45e -r fb659472b2a2 src/lib-storage/index/dbox-single/sdbox-sync.c
--- a/src/lib-storage/index/dbox-single/sdbox-sync.c Wed Feb 01 23:06:12 2012 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-sync.c Wed Feb 01 23:33:51 2012 +0200
@@ -12,9 +12,17 @@
dbox_sync_file_move_if_needed(struct dbox_file *file,
enum sdbox_sync_entry_type type)
{
+ struct stat st;
bool move_to_alt = type == SDBOX_SYNC_ENTRY_TYPE_MOVE_TO_ALT;
bool deleted;
+ if (move_to_alt == dbox_file_is_in_alt(file) &&
+ !move_to_alt) {
+ /* unopened dbox files default to primary dir.
+ stat the file to update its location. */
+ (void)dbox_file_stat(file, &st);
+
+ }
if (move_to_alt != dbox_file_is_in_alt(file)) {
/* move the file. if it fails, nothing broke so
don't worry about it. */
More information about the dovecot-cvs
mailing list