Also ignore leap-seconds.list

The tzdata package on Ubuntu includes /usr/share/zoneinfo/leap-
seconds.list. This is not a TZif file, so it should be ignored.
This commit is contained in:
Roel Standaert
2017-06-29 13:22:04 +02:00
committed by Howard Hinnant
parent 090b66beb8
commit 7cbc4d8013

3
tz.cpp
View File

@@ -2511,7 +2511,8 @@ init_tzdb()
strcmp(d->d_name, "right") == 0 || strcmp(d->d_name, "right") == 0 ||
strcmp(d->d_name, "+VERSION") == 0 || strcmp(d->d_name, "+VERSION") == 0 ||
strcmp(d->d_name, "zone.tab") == 0 || strcmp(d->d_name, "zone.tab") == 0 ||
strcmp(d->d_name, "zone1970.tab") == 0 ) strcmp(d->d_name, "zone1970.tab") == 0 ||
strcmp(d->d_name, "leap-seconds.list") == 0 )
continue; continue;
auto subname = dirname + folder_delimiter + d->d_name; auto subname = dirname + folder_delimiter + d->d_name;
if(stat(subname.c_str(), &s) == 0) if(stat(subname.c_str(), &s) == 0)