[dovecot/core] 569341: lib-storage: Mailbox rename shouldn't auto-rmdir p...

GitHub noreply at github.com
Tue Jul 25 22:30:09 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 5693411c1b19c99b9a91a3d9af6c9e681d2d0263
      https://github.com/dovecot/core/commit/5693411c1b19c99b9a91a3d9af6c9e681d2d0263
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-25 (Tue, 25 Jul 2017)

  Changed paths:
    M src/lib-storage/list/mailbox-list-delete.c

  Log Message:
  -----------
  lib-storage: Mailbox rename shouldn't auto-rmdir parent index dirs with ITERINDEX

For example:
 - create a/b
 - rename a/b c

This resulted in "a" existing in mail root directory, but not in index
directory. With ITERINDEX this meant that the "a" was lost.


  Commit: eaa2d473ed2ecdb9856cd98a33f4d3063cfaf2a1
      https://github.com/dovecot/core/commit/eaa2d473ed2ecdb9856cd98a33f4d3063cfaf2a1
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-25 (Tue, 25 Jul 2017)

  Changed paths:
    M src/lib-storage/index/index-storage.c
    M src/lib-storage/list/mailbox-list-delete.c
    M src/lib-storage/list/mailbox-list-fs.c
    M src/lib-storage/mailbox-list.c
    M src/lib-storage/mailbox-list.h

  Log Message:
  -----------
  lib-storage: Add setting to disable \NoSelect mailboxes

Enabled using mail_location = ...:NO-NOSELECT

Trying to create \NoSelect "dir/" will result just creating "dir", similar
to how Maildir++ layout already did it.

Deleting a mailbox will delete all of its \NoSelect parents.


  Commit: d823c19df414cac96c7f50a6f78a13fd03bcb27e
      https://github.com/dovecot/core/commit/d823c19df414cac96c7f50a6f78a13fd03bcb27e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-25 (Tue, 25 Jul 2017)

  Changed paths:
    M src/lib-storage/list/mailbox-list-delete.c
    M src/lib-storage/list/mailbox-list-delete.h
    M src/lib-storage/list/mailbox-list-fs-iter.c
    M src/lib-storage/list/mailbox-list-index-iter.c
    M src/lib-storage/list/mailbox-list-iter-private.h

  Log Message:
  -----------
  lib-storage: Hide and rmdir \NoSelect leaf mailboxes with NO-NOSELECT

If the leaf is successfully rmdir()ed, rmdir() also its parents.

This doesn't work perfectly with if there are multiple levels of \NoSelect
mailboxes. For example with "a/b/c" the listing will already have returned
"a" and "a/b" before it reaches the "a/b/c" code, which will rmdir all of
them, but it's a bit too late at that point. It's too much work to fix
though, and the situation will be fixed on the next list anyway.


Compare: https://github.com/dovecot/core/compare/2b1933b133f3...d823c19df414


More information about the dovecot-cvs mailing list