actually clear swapped files when toggling mods...

This commit is contained in:
Adam 2020-12-26 11:54:33 +11:00
parent 6d822a12a1
commit 748c45a461
2 changed files with 6 additions and 1 deletions

View file

@ -55,6 +55,7 @@ namespace Penumbra.Mods
public void CalculateEffectiveFileList()
{
ResolvedFiles.Clear();
SwappedFiles.Clear();
var registeredFiles = new Dictionary< string, string >();

View file

@ -165,7 +165,7 @@ namespace Penumbra
var path = candidate?.FullName ?? swappedFilePath;
// path must be < 260 because statically defined array length :(
if( path == null || path.Length < 260 )
if( path == null || path.Length >= 260 )
{
return CallOriginalHandler( isSync, pFileManager, pCategoryId, pResourceType, pResourceHash, pPath, pUnknown, isUnknown );
}
@ -181,6 +181,10 @@ namespace Penumbra
Crc32.Update( utfPath );
*pResourceHash = Crc32.Checksum;
#if DEBUG
PluginLog.Log( "[GetResourceHandler] resolved {GamePath} to {NewPath}", gameFsPath, path );
#endif
return CallOriginalHandler( isSync, pFileManager, pCategoryId, pResourceType, pResourceHash, pPath, pUnknown, isUnknown );
}