From f9cc31db957a1919f747264964550617ed0ea1d6 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:44:47 -0500 Subject: [PATCH] Root cache directory --- TwitchDownloaderCore/Services/CacheDirectoryService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TwitchDownloaderCore/Services/CacheDirectoryService.cs b/TwitchDownloaderCore/Services/CacheDirectoryService.cs index 9dc5bbff..c9e4e4c9 100644 --- a/TwitchDownloaderCore/Services/CacheDirectoryService.cs +++ b/TwitchDownloaderCore/Services/CacheDirectoryService.cs @@ -13,6 +13,8 @@ public static string GetCacheDirectory([AllowNull] string baseDirectory) if (string.IsNullOrWhiteSpace(baseDirectory)) baseDirectory = Path.GetTempPath(); + baseDirectory = Path.GetFullPath(baseDirectory); + if (new DirectoryInfo(baseDirectory).Name == CACHE_DIRECTORY_SUFFIX) { return baseDirectory;