]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/transports/tf_maildir.c
Build: use PHDRS set in the toplevel Makefile
[user/henk/code/exim.git] / src / src / transports / tf_maildir.c
index 4d5c0c1a9a1960c0aa42e0c2c34f7cb5b6edd689..cd1964aa7492e5a0539f7ea975e60e60ca0b4bc2 100644 (file)
@@ -3,6 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Functions in support of the use of maildirsize files for handling quotas in
@@ -253,15 +254,14 @@ maildir_compute_size(uschar *path, int *filecount, time_t *latest,
 {
 DIR *dir;
 off_t sum = 0;
-struct dirent *ent;
-struct stat statbuf;
 
-if (!(dir = opendir(CS path)))
+if (!(dir = exim_opendir(path)))
   return 0;
 
-while ((ent = readdir(dir)))
+for (struct dirent *ent; ent = readdir(dir); )
   {
   uschar * s, * name = US ent->d_name;
+  struct stat statbuf;
 
   if (Ustrcmp(name, ".") == 0 || Ustrcmp(name, "..") == 0) continue;