(ExtractItemExec): "visit" extracted archive by means of VFS.ChDir()

This commit is contained in:
morkt 2015-09-02 02:59:25 +04:00
parent 5dcbcd76c9
commit 7a8608475e

View File

@ -65,13 +65,15 @@ namespace GARbro.GUI
if (!entry.IsDirectory)
{
var arc_dir = vm.Path.First();
var source = Path.Combine (arc_dir, entry.Name);
var source = entry.Source.Name;
if (string.IsNullOrEmpty (destination))
destination = arc_dir;
SetBusyState();
VFS.ChDir (source);
// extract into directory named after archive
if (!string.IsNullOrEmpty (Path.GetExtension (entry.Name)))
destination = Path.GetFileNameWithoutExtension (source);
extractor = new GarExtract (this, source);
extractor = new GarExtract (this, source, VFS.CurrentArchive);
extractor.ExtractAll (destination);
}
}