Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions std/datetime/timezone.d
Original file line number Diff line number Diff line change
Expand Up @@ -2449,16 +2449,17 @@ public:
}
else
{
import std.path : baseName;
// dirEntries is @system because it uses a DirIterator with a
// RefCounted variable, but here, no references to the payload is
// escaped to the outside, so this should be @trusted
import std.path : baseName, relativePath;
// dirEntries might be @system because it uses a DirIterator with a
// SafeRefCounted variable that's only safe under DIP1000, but
// here no references to the payload are escaped to the outside,
// so this should be @trusted.
() @trusted {
foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))
{
if (de.isFile)
{
auto tzName = de.name[tzDatabaseDir.length .. $];
auto tzName = relativePath(de.name, tzDatabaseDir);

if (!tzName.extension().empty ||
!tzName.startsWith(subName) ||
Expand Down
Loading