Skip to content

Commit

Permalink
Merge pull request #4769 from cyrusimap/imap_rename_tweak
Browse files Browse the repository at this point in the history
mailbox.c: don't try to xunlink() directories
  • Loading branch information
ksmurchison authored Dec 14, 2023
2 parents 9fa0491 + 23ca1f4 commit 37b803e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imap/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -6061,6 +6061,11 @@ static void mailbox_delete_files(const char *path)
dirp = opendir(path);
if (dirp) {
while ((f = readdir(dirp))!=NULL) {
if (f->d_type == DT_DIR) {
/* xunlink() will fail on a directory and create syslog noise.
We rmdir() later in mailbox_delete_cleanup() anyways */
continue;
}
if (f->d_name[0] == '.'
&& (f->d_name[1] == '\0'
|| (f->d_name[1] == '.' &&
Expand Down

0 comments on commit 37b803e

Please sign in to comment.