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

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


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: 224566864db67ab4033b83ef5f98aab5be267481
      https://github.com/dovecot/core/commit/224566864db67ab4033b83ef5f98aab5be267481
  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: a90bb1283bed380572aa5ad89a935547e9fe5463
      https://github.com/dovecot/core/commit/a90bb1283bed380572aa5ad89a935547e9fe5463
  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: aebe1e749a910bc87c691c7a53c5de09eed79cfd
      https://github.com/dovecot/core/commit/aebe1e749a910bc87c691c7a53c5de09eed79cfd
  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/5d39748585ce...aebe1e749a91


More information about the dovecot-cvs mailing list