diff --git a/App.xaml.cs b/App.xaml.cs index 080c475a..0f20f349 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -74,7 +74,6 @@ namespace GARbro.GUI void ApplicationExit (object sender, ExitEventArgs e) { - Settings.Default.appLastDirectory = Directory.GetCurrentDirectory(); Settings.Default.Save(); } diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 9c523d18..f6ba46e8 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -105,6 +105,16 @@ namespace GARbro.GUI } else Settings.Default.lvSortColumn = ""; + + string cwd = CurrentPath; + if (!string.IsNullOrEmpty (cwd)) + { + if (ViewModel.IsArchive) + cwd = Path.GetDirectoryName (cwd); + } + else + cwd = Directory.GetCurrentDirectory(); + Settings.Default.appLastDirectory = cwd; } ///