Skip to content

Commit

Permalink
[fuchsia] Adds new tzdata dir, explains all dirs (#278)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
filmil authored Oct 11, 2023
1 parent 65036e9 commit b6d7a85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/time_zone_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,16 @@ std::unique_ptr<ZoneInfoSource> 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] == '/');
Expand Down

0 comments on commit b6d7a85

Please sign in to comment.