]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
fs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 3 May 2018 12:22:09 +0000 (15:22 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 11 May 2018 11:02:50 +0000 (14:02 +0300)
commit7d597ea89faa4dd7f73966c40069055769a5d396
tree47f127b82d7d8c031a8672fb1d5b83a51223dcc3
parent506d5962ba249b0b313cfa324ede660b80fb5a78
fs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME

The temp file is created to the initial directory. If the directory is
changed by FS_METADATA_WRITE_FNAME, the new destination directory didn't
necessarily exist. If the link() or rename() fails with ENOENT, try to
mkdir the missing directories.
src/lib-fs/fs-posix.c