From 1b576469f3da3d7bf5ec69a0ca69c5df9421c721 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Tue, 14 Sep 2021 12:38:24 +0200 Subject: [PATCH] Small fixes for migration. --- Penumbra/Mods/ModCollection.cs | 2 +- Penumbra/Mods/ModManager.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Penumbra/Mods/ModCollection.cs b/Penumbra/Mods/ModCollection.cs index 5646601e..b75d8af6 100644 --- a/Penumbra/Mods/ModCollection.cs +++ b/Penumbra/Mods/ModCollection.cs @@ -189,7 +189,7 @@ namespace Penumbra.Mods => new( Path.Combine( collectionDir.FullName, $"{name.RemoveInvalidPathSymbols()}.json" ) ); public FileInfo FileName() - => new( Path.Combine( Service< DalamudPluginInterface >.Get().GetPluginConfigDirectory(), + => new( Path.Combine( Dalamud.PluginInterface.GetPluginConfigDirectory(), $"{Name.RemoveInvalidPathSymbols()}.json" ) ); public void Save() diff --git a/Penumbra/Mods/ModManager.cs b/Penumbra/Mods/ModManager.cs index 05cccca6..a2d23169 100644 --- a/Penumbra/Mods/ModManager.cs +++ b/Penumbra/Mods/ModManager.cs @@ -35,8 +35,13 @@ namespace Penumbra.Mods private void ClearOldTmpDir() { + if (!TempWritable) + { + return; + } + TempPath.Refresh(); - if( TempWritable && TempPath.Exists ) + if( TempPath.Exists ) { try {