chore: finalize resource pack cache toggle

Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/70cfa855-cff8-495e-ac06-9a65bb5cc913

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-04 12:47:41 +00:00 committed by GitHub
parent b87b5abbe2
commit b543825200
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View file

@ -699,7 +699,11 @@ namespace MinecraftClient.Protocol.Message
if (translations.Count == 0)
return;
Directory.CreateDirectory(Path.GetDirectoryName(cacheFilePath)!);
string? cacheDirectory = Path.GetDirectoryName(cacheFilePath);
if (string.IsNullOrEmpty(cacheDirectory))
return;
Directory.CreateDirectory(cacheDirectory);
ResourcePackTranslationCacheEntry cacheEntry = new()
{