Skip to content

Commit

Permalink
Fix misleading log (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jun 24, 2024
1 parent ac2ecf5 commit d25c1ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TwitchDownloaderCore/TwitchHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,8 @@ where comments

public static FileInfo ClaimFile(string path, Func<FileInfo, FileInfo> 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)
Expand All @@ -882,9 +883,9 @@ public static FileInfo ClaimFile(string path, Func<FileInfo, FileInfo> 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}'");
}
}
}
Expand Down

0 comments on commit d25c1ca

Please sign in to comment.