summaryrefslogtreecommitdiff
path: root/src/timezone/zic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timezone/zic.c')
-rw-r--r--src/timezone/zic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index 2f623e03a58..a83cea12ddc 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -3634,6 +3634,11 @@ mkdirs(char const * argname, bool ancestors)
*/
if (mkdir(name, MKDIR_UMASK) != 0)
{
+ /*
+ * For speed, skip itsdir if errno == EEXIST. Since mkdirs is
+ * called only after open fails with ENOENT on a subfile, EEXIST
+ * implies itsdir here.
+ */
int err = errno;
if (err != EEXIST && !itsdir(name))