mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
Small fixes for backup, respect export directory on load.
This commit is contained in:
parent
c800f3191f
commit
b65bef17b2
4 changed files with 17 additions and 10 deletions
|
|
@ -1,4 +1,3 @@
|
|||
using ImGuizmoNET;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
|
|
@ -110,7 +109,7 @@ public sealed partial class Mod
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateExportDirectory( string newDirectory )
|
||||
public void UpdateExportDirectory( string newDirectory, bool change )
|
||||
{
|
||||
if( newDirectory.Length == 0 )
|
||||
{
|
||||
|
|
@ -144,14 +143,21 @@ public sealed partial class Mod
|
|||
}
|
||||
}
|
||||
|
||||
foreach( var mod in _mods )
|
||||
if( change )
|
||||
{
|
||||
new ModBackup( mod ).Move( dir.FullName );
|
||||
foreach( var mod in _mods )
|
||||
{
|
||||
new ModBackup( mod ).Move( dir.FullName );
|
||||
}
|
||||
}
|
||||
|
||||
_exportDirectory = dir;
|
||||
Penumbra.Config.ExportDirectory = dir.FullName;
|
||||
Penumbra.Config.Save();
|
||||
_exportDirectory = dir;
|
||||
|
||||
if( change )
|
||||
{
|
||||
Penumbra.Config.ExportDirectory = dir.FullName;
|
||||
Penumbra.Config.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,6 +39,7 @@ public sealed partial class Mod
|
|||
{
|
||||
ModDirectoryChanged += OnModDirectoryChange;
|
||||
SetBaseDirectory( modDirectory, true );
|
||||
UpdateExportDirectory( Penumbra.Config.ExportDirectory, false );
|
||||
ModOptionChanged += OnModOptionChange;
|
||||
ModPathChanged += OnModPathChange;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue