mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Delete the penumbrametatmp folder on migration.
This commit is contained in:
parent
3b2876a6e4
commit
b71552607e
1 changed files with 18 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ public partial class Configuration
|
||||||
// The forced collection was removed due to general inheritance.
|
// The forced collection was removed due to general inheritance.
|
||||||
// Sort Order was moved to a separate file and may contain empty folders.
|
// Sort Order was moved to a separate file and may contain empty folders.
|
||||||
// Active collections in general were moved to their own file.
|
// Active collections in general were moved to their own file.
|
||||||
|
// Delete the penumbrametatmp folder if it exists.
|
||||||
private void Version1To2()
|
private void Version1To2()
|
||||||
{
|
{
|
||||||
if( _config.Version != 1 )
|
if( _config.Version != 1 )
|
||||||
|
|
@ -71,6 +72,7 @@ public partial class Configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the right meta files are loaded.
|
// Ensure the right meta files are loaded.
|
||||||
|
DeleteMetaTmp();
|
||||||
Penumbra.CharacterUtility.LoadCharacterResources();
|
Penumbra.CharacterUtility.LoadCharacterResources();
|
||||||
ResettleSortOrder();
|
ResettleSortOrder();
|
||||||
ResettleCollectionSettings();
|
ResettleCollectionSettings();
|
||||||
|
|
@ -78,6 +80,22 @@ public partial class Configuration
|
||||||
_config.Version = 2;
|
_config.Version = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeleteMetaTmp()
|
||||||
|
{
|
||||||
|
var path = Path.Combine( _config.ModDirectory, "penumbrametatmp" );
|
||||||
|
if( Directory.Exists( path ) )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.Delete( path, true );
|
||||||
|
}
|
||||||
|
catch( Exception e )
|
||||||
|
{
|
||||||
|
PluginLog.Error( $"Could not delete the outdated penumbrametatmp folder:\n{e}" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ResettleForcedCollection()
|
private void ResettleForcedCollection()
|
||||||
{
|
{
|
||||||
ForcedCollection = _data[ nameof( ForcedCollection ) ]?.ToObject< string >() ?? ForcedCollection;
|
ForcedCollection = _data[ nameof( ForcedCollection ) ]?.ToObject< string >() ?? ForcedCollection;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue