mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Memory leak.
This commit is contained in:
parent
92a87fed63
commit
65b4ae7409
1 changed files with 15 additions and 11 deletions
|
|
@ -488,19 +488,23 @@ begin
|
|||
// Executing files directly only works for FileSystem.
|
||||
|
||||
aFile := TFileSystemFileSource.CreateFileFromFile(sFileName);
|
||||
try
|
||||
sCommand:= gExts.GetExtActionCmd(aFile, sCmd);
|
||||
if sCommand <> '' then
|
||||
begin
|
||||
ReplaceExtCommand(sCommand, aFile, sActiveDir);
|
||||
Result:= ProcessExtCommand(sCommand, sActiveDir);
|
||||
end;
|
||||
|
||||
sCommand:= gExts.GetExtActionCmd(aFile, sCmd);
|
||||
if sCommand <> '' then
|
||||
begin
|
||||
ReplaceExtCommand(sCommand, aFile, sActiveDir);
|
||||
Result:= ProcessExtCommand(sCommand, sActiveDir);
|
||||
end;
|
||||
if not Result then
|
||||
begin
|
||||
mbSetCurrentDir(sActiveDir);
|
||||
Result:= ShellExecute(sFileName);
|
||||
end;
|
||||
|
||||
if not Result then
|
||||
begin
|
||||
mbSetCurrentDir(sActiveDir);
|
||||
Result:= ShellExecute(sFileName);
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(aFile);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue