From 88890939d539d811013c8fa06eb22533eb854b46 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 14 Jun 2017 20:48:19 -0400 Subject: [PATCH] Add zone1970.tab to the list of files that should be ignored by init_tzdb() under USE_OS_TZDB. --- tz.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tz.cpp b/tz.cpp index 1880c7b..83530c4 100644 --- a/tz.cpp +++ b/tz.cpp @@ -2347,13 +2347,14 @@ init_tzdb() while ((d = readdir(dir)) != nullptr) { // Ignore these files: - if (d->d_name[0] == '.' || // curdir, prevdir, hidden - memcmp(d->d_name, "posix", 5) == 0 || // starts with posix - strcmp(d->d_name, "Factory") == 0 || - strcmp(d->d_name, "iso3166.tab") == 0 || - strcmp(d->d_name, "right") == 0 || - strcmp(d->d_name, "+VERSION") == 0 || - strcmp(d->d_name, "zone.tab") == 0 ) + if (d->d_name[0] == '.' || // curdir, prevdir, hidden + memcmp(d->d_name, "posix", 5) == 0 || // starts with posix + strcmp(d->d_name, "Factory") == 0 || + strcmp(d->d_name, "iso3166.tab") == 0 || + strcmp(d->d_name, "right") == 0 || + strcmp(d->d_name, "+VERSION") == 0 || + strcmp(d->d_name, "zone.tab") == 0 || + strcmp(d->d_name, "zone1970.tab") == 0 ) continue; auto subname = dirname + folder_delimiter + d->d_name; if(stat(subname.c_str(), &s) == 0)