]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Maildir++ quota: If there are no limits, write "0S" as the file header.
authorTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 20:27:33 +0000 (23:27 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 20:27:33 +0000 (23:27 +0300)
--HG--
branch : HEAD

src/plugins/quota/quota-maildir.c

index 5fffb0c60ecf446313413df571fc0da2e34805bc..75ebd7b4f5ce1d672417beb06778460904d89f8a 100644 (file)
@@ -279,7 +279,8 @@ static int maildirsize_write(struct maildir_quota_root *root, const char *path)
        }
 
        str = t_str_new(128);
-       if (_root->bytes_limit != 0) {
+       /* if we have no limits, write 0S instead of an empty line */
+       if (_root->bytes_limit != 0 || _root->count_limit == 0) {
                str_printfa(str, "%lluS",
                            (unsigned long long)_root->bytes_limit);
        }