File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2449,16 +2449,17 @@ public:
24492449 }
24502450 else
24512451 {
2452- import std.path : baseName;
2453- // dirEntries is @system because it uses a DirIterator with a
2454- // RefCounted variable, but here, no references to the payload is
2455- // escaped to the outside, so this should be @trusted
2452+ import std.path : baseName, relativePath;
2453+ // dirEntries might be @system because it uses a DirIterator with a
2454+ // SafeRefCounted variable that's only safe under DIP1000, but
2455+ // here no references to the payload are escaped to the outside,
2456+ // so this should be @trusted.
24562457 () @trusted {
24572458 foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))
24582459 {
24592460 if (de.isFile)
24602461 {
2461- auto tzName = de.name[tzDatabaseDir.length .. $] ;
2462+ auto tzName = relativePath( de.name, tzDatabaseDir) ;
24622463
24632464 if (! tzName.extension().empty ||
24642465 ! tzName.startsWith(subName) ||
You can’t perform that action at this time.
0 commit comments