UPD: improve handling when ".." is selected in ReplaceVarParams()

This commit is contained in:
rich2014 2026-06-06 15:27:35 +08:00
commit 5af28c634e

View file

@ -898,10 +898,11 @@ begin
leftFile:= frmMain.FrameLeft.CloneActiveFile;
rightFile:= frmMain.FrameRight.CloneActiveFile;
// ".." should be interpreted as the parent directory
if Assigned(leftFile) and (not leftFile.IsNameValid) then
FreeAndNil(leftFile);
leftFile.Name:= EmptyStr;
if Assigned(rightFile) and (not rightFile.IsNameValid) then
FreeAndNil(rightFile);
rightFile.Name:= EmptyStr;
if frmMain.ActiveFrame = frmMain.FrameLeft then
begin