~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/plugins/quota/quota-dirsize.c

  • Committer: Package Import Robot
  • Author(s): Jaldhar H. Vyas
  • Date: 2013-09-09 00:57:32 UTC
  • mfrom: (1.13.11)
  • mto: (4.8.5 experimental) (1.16.1)
  • mto: This revision was merged to the branch mainline in revision 97.
  • Revision ID: package-import@ubuntu.com-20130909005732-dn1eell8srqbhh0e
Tags: upstream-2.2.5
ImportĀ upstreamĀ versionĀ 2.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2005-2012 Dovecot authors, see the included COPYING file */
 
1
/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */
2
2
 
3
3
/* Quota reporting based on simply summing sizes of all files in mailbox
4
4
   together. */
162
162
                        continue;
163
163
 
164
164
                is_file = mail_storage_is_mailbox_file(namespaces[i]->storage);
165
 
                path = mailbox_list_get_path(namespaces[i]->list, NULL,
166
 
                                             MAILBOX_LIST_PATH_TYPE_DIR);
167
 
                quota_count_path_add(&paths, path, FALSE);
 
165
                if (mailbox_list_get_root_path(namespaces[i]->list,
 
166
                                               MAILBOX_LIST_PATH_TYPE_DIR, &path))
 
167
                        quota_count_path_add(&paths, path, FALSE);
168
168
 
169
169
                /* INBOX may be in different path. */
170
 
                path = mailbox_list_get_path(namespaces[i]->list, "INBOX",
171
 
                                             MAILBOX_LIST_PATH_TYPE_MAILBOX);
172
 
                quota_count_path_add(&paths, path, is_file);
 
170
                if (mailbox_list_get_path(namespaces[i]->list, "INBOX",
 
171
                                          MAILBOX_LIST_PATH_TYPE_MAILBOX, &path) > 0)
 
172
                        quota_count_path_add(&paths, path, is_file);
173
173
        }
174
174
 
175
175
        /* now sum up the found paths */