mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Bug [0000850] "CTRL-right on ZIP archive doesn't set parent directory correctly"
This commit is contained in:
parent
ec8ec7dfce
commit
a80ef960c2
2 changed files with 18 additions and 1 deletions
|
|
@ -224,6 +224,11 @@ function ChooseArchive(aFileView: TFileView; aFile: TFile; bForce: Boolean): Boo
|
|||
var
|
||||
FileSource: IFileSource;
|
||||
begin
|
||||
if not mbCompareFileNames(aFileView.CurrentPath, aFile.Path) then
|
||||
begin
|
||||
SetFileSystemPath(aFileView, aFile.Path);
|
||||
end;
|
||||
|
||||
// Check if there is a ArchiveFileSource for possible archive.
|
||||
FileSource := GetArchiveFileSource(aFileView.FileSource, aFile, EmptyStr, bForce);
|
||||
|
||||
|
|
|
|||
|
|
@ -795,13 +795,25 @@ procedure TMainCommands.cm_OpenDirInNewTab(const Params: array of string);
|
|||
NewPage.MakeActive;
|
||||
end;
|
||||
|
||||
procedure OpenArchive(const aFile: TFile);
|
||||
var
|
||||
NewPage: TFileViewPage;
|
||||
begin
|
||||
NewPage := FrmMain.ActiveNotebook.NewPage(FrmMain.ActiveFrame);
|
||||
ChooseArchive(NewPage.FileView, aFile);
|
||||
if tb_open_new_in_foreground in gDirTabOptions then
|
||||
NewPage.MakeActive;
|
||||
end;
|
||||
|
||||
var
|
||||
aFile: TFile;
|
||||
begin
|
||||
aFile := FrmMain.ActiveFrame.CloneActiveFile;
|
||||
if Assigned(aFile) then
|
||||
try
|
||||
if aFile.IsNameValid and (aFile.IsDirectory or aFile.IsLinkToDirectory) then
|
||||
if FileIsArchive(aFile.FullPath) then
|
||||
OpenArchive(aFile)
|
||||
else if aFile.IsNameValid and (aFile.IsDirectory or aFile.IsLinkToDirectory) then
|
||||
OpenTab(aFile.FullPath)
|
||||
else
|
||||
OpenTab(FrmMain.ActiveFrame.CurrentPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue