Skip to content

Commit 7dd74fc

Browse files
authored
Check for an empty string for the TimeZoneDirectory environment variable (#112831)
* Check for an empty string for the TimeZoneDirectory environment variable * Code feedback
1 parent 9296e04 commit 7dd74fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ private static string GetTimeZoneDirectory()
613613
{
614614
string? tzDirectory = Environment.GetEnvironmentVariable(TimeZoneDirectoryEnvironmentVariable);
615615

616-
if (tzDirectory == null)
616+
if (string.IsNullOrEmpty(tzDirectory))
617617
{
618618
tzDirectory = DefaultTimeZoneDirectory;
619619
}

0 commit comments

Comments
 (0)