mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
extract all files when no entries are selected.
This commit is contained in:
parent
616fce969c
commit
92aa3debab
@ -44,7 +44,7 @@ namespace GARbro.GUI
|
|||||||
private void ExtractItemExec (object sender, ExecutedRoutedEventArgs e)
|
private void ExtractItemExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var entry = CurrentDirectory.SelectedItem as EntryViewModel;
|
var entry = CurrentDirectory.SelectedItem as EntryViewModel;
|
||||||
if (null == entry)
|
if (null == entry && !ViewModel.IsArchive)
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ namespace GARbro.GUI
|
|||||||
var vm = ViewModel as ArchiveViewModel;
|
var vm = ViewModel as ArchiveViewModel;
|
||||||
string destination = Path.GetDirectoryName (vm.Path);
|
string destination = Path.GetDirectoryName (vm.Path);
|
||||||
string arc_name = Path.GetFileName (vm.Path);
|
string arc_name = Path.GetFileName (vm.Path);
|
||||||
if (entry.Name == ".." && vm.SubDir == "") // root entry
|
if (null == entry || (entry.Name == ".." && vm.SubDir == "")) // root entry
|
||||||
{
|
{
|
||||||
ExtractArchive (m_app.CurrentArchive, arc_name, destination);
|
ExtractArchive (m_app.CurrentArchive, arc_name, destination);
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
m_watcher.EnableRaisingEvents = true;
|
ResumeWatchDirectoryChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IEnumerable<Entry> file_list = arc.Dir;
|
IEnumerable<Entry> file_list = arc.Dir;
|
||||||
|
Loading…
Reference in New Issue
Block a user