Skip to content

Commit ac867a6

Browse files
committed
Minimise warnings from one place to two
1 parent 430122c commit ac867a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dotnet/src/webdriver/Internal/FileUtilities.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,10 @@ public static string GetCurrentDirectory()
168168
string? location = null;
169169

170170
// Make sure not to call Path.GetDirectoryName if assembly location is null or empty
171-
if (!string.IsNullOrEmpty(executingAssembly.Location))
171+
string assemblyLocation = executingAssembly.Location;
172+
if (!string.IsNullOrEmpty(assemblyLocation))
172173
{
173-
location = Path.GetDirectoryName(executingAssembly.Location);
174+
location = Path.GetDirectoryName(assemblyLocation);
174175
}
175176

176177
if (string.IsNullOrEmpty(location))

0 commit comments

Comments
 (0)