mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Access violation on attempt to edit directory in file search results (fixes #949)
(cherry picked from commit 76a5f8025b)
This commit is contained in:
parent
d574b5f645
commit
1be8fa91ee
1 changed files with 9 additions and 2 deletions
|
|
@ -1926,14 +1926,21 @@ end;
|
|||
|
||||
{ TfrmFindDlg.cm_Edit }
|
||||
procedure TfrmFindDlg.cm_Edit(const Params: array of string);
|
||||
var
|
||||
FileName: String;
|
||||
begin
|
||||
if pgcSearch.ActivePage = tsResults then
|
||||
if lsFoundedFiles.ItemIndex <> -1 then
|
||||
begin
|
||||
if (ObjectType(lsFoundedFiles.ItemIndex) = cbChecked) then
|
||||
msgError(rsMsgErrNotSupported)
|
||||
else
|
||||
ShowEditorByGlob(lsFoundedFiles.Items[lsFoundedFiles.ItemIndex]);
|
||||
else begin
|
||||
FileName:= lsFoundedFiles.Items[lsFoundedFiles.ItemIndex];
|
||||
if mbFileExists(FileName) then
|
||||
ShowEditorByGlob(FileName)
|
||||
else
|
||||
msgError(Format(rsMsgFileNotFound, [FileName]));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue