From d25c1ca69a35d2c6b03e5de3845e6f8d0b1c074d Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:07:24 -0400 Subject: [PATCH] Fix misleading log (again) --- TwitchDownloaderCore/TwitchHelper.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TwitchDownloaderCore/TwitchHelper.cs b/TwitchDownloaderCore/TwitchHelper.cs index 7ec093d8..9c78ceaa 100644 --- a/TwitchDownloaderCore/TwitchHelper.cs +++ b/TwitchDownloaderCore/TwitchHelper.cs @@ -865,7 +865,8 @@ where comments public static FileInfo ClaimFile(string path, Func fileAlreadyExistsCallback, ITaskLogger logger) { - var fileInfo = new FileInfo(path); + var fullPath = Path.GetFullPath(path); + var fileInfo = new FileInfo(fullPath); if (fileInfo.Exists) { if (fileAlreadyExistsCallback is null) @@ -882,9 +883,9 @@ public static FileInfo ClaimFile(string path, Func fileAlrea throw new FileNotFoundException("No destination file was provided, aborting."); } - if (path != fileInfo.FullName) + if (fullPath != fileInfo.FullName) { - logger.LogInfo($"'{path}' will be renamed to '{fileInfo.FullName}'"); + logger.LogInfo($"'{fullPath}' will be renamed to '{fileInfo.FullName}'"); } } }