From 666fdb5d5adb31df6dcb5c76d6775dd688fc5269 Mon Sep 17 00:00:00 2001 From: jshigetomi <124807742+jshigetomi@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:00:42 -0500 Subject: [PATCH] Show file name in Invoke-WebRequest -OutFile -Verbose (#24041) --- .../WebCmdlet/CoreCLR/InvokeWebRequestCommand.CoreClr.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/InvokeWebRequestCommand.CoreClr.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/InvokeWebRequestCommand.CoreClr.cs index 78388f74de..be40884ced 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/InvokeWebRequestCommand.CoreClr.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/InvokeWebRequestCommand.CoreClr.cs @@ -63,7 +63,7 @@ namespace Microsoft.PowerShell.Commands { string outFilePath = WebResponseHelper.GetOutFilePath(response, _qualifiedOutFile); - WriteVerbose(string.Create(System.Globalization.CultureInfo.InvariantCulture, $"File Name: {Path.GetFileName(_qualifiedOutFile)}")); + WriteVerbose(string.Create(System.Globalization.CultureInfo.InvariantCulture, $"File Name: {Path.GetFileName(outFilePath)}")); // ContentLength is always the partial length, while ContentRange is the full length // Without Request.Range set, ContentRange is null and partial length (ContentLength) equals to full length