mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 23:37:47 +01:00
Give error information on IMC problems.
This commit is contained in:
parent
a37a8eb5aa
commit
35cff163f8
4 changed files with 76 additions and 33 deletions
|
|
@ -70,24 +70,33 @@ public partial class MetaManager
|
|||
#if USE_IMC
|
||||
Manipulations[ m ] = mod;
|
||||
var path = m.GamePath();
|
||||
if( !Files.TryGetValue( path, out var file ) )
|
||||
try
|
||||
{
|
||||
file = new ImcFile( path );
|
||||
}
|
||||
if( !Files.TryGetValue( path, out var file ) )
|
||||
{
|
||||
file = new ImcFile( path );
|
||||
}
|
||||
|
||||
if( !m.Apply( file ) )
|
||||
if( !m.Apply( file ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Files[ path ] = file;
|
||||
var fullPath = CreateImcPath( path );
|
||||
if( _collection.HasCache )
|
||||
{
|
||||
_collection.ForceFile( path, fullPath );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
++Penumbra.ImcExceptions;
|
||||
PluginLog.Error( $"Could not apply IMC Manipulation:\n{e}" );
|
||||
return false;
|
||||
}
|
||||
|
||||
Files[ path ] = file;
|
||||
var fullPath = CreateImcPath( path );
|
||||
if( _collection.HasCache )
|
||||
{
|
||||
_collection.ForceFile( path, fullPath );
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue