Ignore EEXIST when creating DAV_SYS_RUN (bug #57233)

This commit is contained in:
wbaumann
2019-11-19 08:19:18 +00:00
parent 9e88f6b97b
commit 96d21fb708
2 changed files with 6 additions and 2 deletions

View File

@ -493,7 +493,7 @@ check_dirs(dav_args *args)
gain_privileges(args);
if (stat(DAV_SYS_RUN, &st) != 0) {
if (mkdir(DAV_SYS_RUN, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH | S_ISVTX)
!= 0)
!= 0 && errno != EEXIST)
error(EXIT_FAILURE, errno, _("can't create directory %s"),
DAV_SYS_RUN);
}