Changed initial mod directory to be empty and prevent crashes on invalid or no root directories (also add some information to debug).

This commit is contained in:
Ottermandias 2021-07-11 23:15:42 +02:00
parent e41dedf9dd
commit 92e95400b0
9 changed files with 95 additions and 37 deletions

View file

@ -126,7 +126,11 @@ namespace Penumbra.Meta
public void WriteNewFiles()
{
Directory.CreateDirectory( _dir.FullName );
if( _currentFiles.Any() )
{
Directory.CreateDirectory( _dir.FullName );
}
foreach( var kvp in _currentFiles.Where( kvp => kvp.Value.Changed ) )
{
kvp.Value.Write( _dir, kvp.Key );