From b6d7a852f149bc9304f78a64736e02b491321312 Mon Sep 17 00:00:00 2001 From: Filip Filmar Date: Wed, 11 Oct 2023 13:14:25 -0700 Subject: [PATCH] [fuchsia] Adds new tzdata dir, explains all dirs (#278) Added `/config/tzdata` as a canonical path in the Fuchsia component's namespace. This is from: https://fuchsia.dev/fuchsia-src/concepts/process/namespaces#typical_directory_structure Each directory prefix entry in the list of prefixes that Fuchsia looks for timezone data files is now explained with a comment. --- src/time_zone_info.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/time_zone_info.cc b/src/time_zone_info.cc index a0a3652..a7396a8 100644 --- a/src/time_zone_info.cc +++ b/src/time_zone_info.cc @@ -534,9 +534,16 @@ std::unique_ptr FuchsiaZoneInfoSource::Open( // Prefixes where a Fuchsia component might find zoneinfo files, // in descending order of preference. const auto kTzdataPrefixes = { + // The tzdata from `config-data`. "/config/data/tzdata/", + // The tzdata bundled in the component's package. "/pkg/data/tzdata/", + // General data storage. "/data/tzdata/", + // The recommended path for routed-in tzdata files. + // See for details: + // https://fuchsia.dev/fuchsia-src/concepts/process/namespaces?hl=en#typical_directory_structure + "/config/tzdata/", }; const auto kEmptyPrefix = {""}; const bool name_absolute = (pos != name.size() && name[pos] == '/');