From db0928aa799e81141b38859162c0070308c6b8ab Mon Sep 17 00:00:00 2001 From: Scrub <72096833+ScrubN@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:49:10 -0400 Subject: [PATCH] Fix issues with relative cache paths (#1151) --- TwitchDownloaderCore/ChatDownloader.cs | 2 +- TwitchDownloaderCore/ChatRenderer.cs | 2 +- TwitchDownloaderCore/ChatUpdater.cs | 2 +- TwitchDownloaderCore/ClipDownloader.cs | 2 +- TwitchDownloaderCore/VideoDownloader.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TwitchDownloaderCore/ChatDownloader.cs b/TwitchDownloaderCore/ChatDownloader.cs index 3a0c5e8b..1367267c 100644 --- a/TwitchDownloaderCore/ChatDownloader.cs +++ b/TwitchDownloaderCore/ChatDownloader.cs @@ -38,7 +38,7 @@ public ChatDownloader(ChatDownloadOptions chatDownloadOptions, ITaskProgress pro downloadOptions = chatDownloadOptions; _progress = progress; downloadOptions.TempFolder = Path.Combine( - string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : downloadOptions.TempFolder, + string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : Path.GetFullPath(downloadOptions.TempFolder), "TwitchDownloader"); } diff --git a/TwitchDownloaderCore/ChatRenderer.cs b/TwitchDownloaderCore/ChatRenderer.cs index f6bf6e84..17861d91 100644 --- a/TwitchDownloaderCore/ChatRenderer.cs +++ b/TwitchDownloaderCore/ChatRenderer.cs @@ -58,7 +58,7 @@ public ChatRenderer(ChatRenderOptions chatRenderOptions, ITaskProgress progress) { renderOptions = chatRenderOptions; renderOptions.TempFolder = Path.Combine( - string.IsNullOrWhiteSpace(renderOptions.TempFolder) ? Path.GetTempPath() : renderOptions.TempFolder, + string.IsNullOrWhiteSpace(renderOptions.TempFolder) ? Path.GetTempPath() : Path.GetFullPath(renderOptions.TempFolder), "TwitchDownloader"); renderOptions.BlockArtPreWrapWidth = 29.166 * renderOptions.FontSize - renderOptions.SidePadding * 2; renderOptions.BlockArtPreWrap = renderOptions.ChatWidth > renderOptions.BlockArtPreWrapWidth; diff --git a/TwitchDownloaderCore/ChatUpdater.cs b/TwitchDownloaderCore/ChatUpdater.cs index cf3c7dc3..8613d823 100644 --- a/TwitchDownloaderCore/ChatUpdater.cs +++ b/TwitchDownloaderCore/ChatUpdater.cs @@ -26,7 +26,7 @@ public ChatUpdater(ChatUpdateOptions updateOptions, ITaskProgress progress) _updateOptions = updateOptions; _progress = progress; _updateOptions.TempFolder = Path.Combine( - string.IsNullOrWhiteSpace(_updateOptions.TempFolder) ? Path.GetTempPath() : _updateOptions.TempFolder, + string.IsNullOrWhiteSpace(_updateOptions.TempFolder) ? Path.GetTempPath() : Path.GetFullPath(_updateOptions.TempFolder), "TwitchDownloader"); } diff --git a/TwitchDownloaderCore/ClipDownloader.cs b/TwitchDownloaderCore/ClipDownloader.cs index 0ed26659..1a85ccbf 100644 --- a/TwitchDownloaderCore/ClipDownloader.cs +++ b/TwitchDownloaderCore/ClipDownloader.cs @@ -25,7 +25,7 @@ public ClipDownloader(ClipDownloadOptions clipDownloadOptions, ITaskProgress pro downloadOptions = clipDownloadOptions; _progress = progress; downloadOptions.TempFolder = Path.Combine( - string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : downloadOptions.TempFolder, + string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : Path.GetFullPath(downloadOptions.TempFolder), "TwitchDownloader"); } diff --git a/TwitchDownloaderCore/VideoDownloader.cs b/TwitchDownloaderCore/VideoDownloader.cs index 487fc5d7..a81190f8 100644 --- a/TwitchDownloaderCore/VideoDownloader.cs +++ b/TwitchDownloaderCore/VideoDownloader.cs @@ -29,7 +29,7 @@ public VideoDownloader(VideoDownloadOptions videoDownloadOptions, ITaskProgress { downloadOptions = videoDownloadOptions; downloadOptions.TempFolder = Path.Combine( - string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : downloadOptions.TempFolder, + string.IsNullOrWhiteSpace(downloadOptions.TempFolder) ? Path.GetTempPath() : Path.GetFullPath(downloadOptions.TempFolder), "TwitchDownloader"); downloadOptions.TrimBeginningTime = downloadOptions.TrimBeginningTime >= TimeSpan.Zero ? downloadOptions.TrimBeginningTime : TimeSpan.Zero; downloadOptions.TrimEndingTime = downloadOptions.TrimEndingTime >= TimeSpan.Zero ? downloadOptions.TrimEndingTime : TimeSpan.Zero;