mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Execute LinksToLocalFiles
This commit is contained in:
parent
35e839a753
commit
88a77cd0a6
1 changed files with 9 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ var
|
|||
sCmd, sParams, sStartPath: String;
|
||||
Operation: TFileSourceExecuteOperation = nil;
|
||||
aFileCopy: TFile = nil;
|
||||
IsLinkToLocalFile: Boolean = False;
|
||||
begin
|
||||
// First test for file sources.
|
||||
if ChooseFileSource(aFileView, aFileSource, aFile) then
|
||||
|
|
@ -70,7 +71,7 @@ begin
|
|||
if aFileView.FileSource.Properties * [fspDirectAccess, fspLinksToLocalFiles] <> [] then
|
||||
begin
|
||||
if fspLinksToLocalFiles in aFileView.FileSource.Properties then
|
||||
aFileView.FileSource.GetLocalName(aFile);
|
||||
IsLinkToLocalFile := aFileView.FileSource.GetLocalName(aFile);
|
||||
|
||||
// Now test if exists Open command in "extassoc.xml" :)
|
||||
if gExts.GetExtActionCmd(aFile, 'open', sCmd, sParams, sStartPath) then
|
||||
|
|
@ -83,7 +84,13 @@ begin
|
|||
if (fsoExecute in aFileView.FileSource.GetOperationsTypes) then
|
||||
try
|
||||
aFileCopy := aFile.Clone;
|
||||
Operation := aFileView.FileSource.CreateExecuteOperation(
|
||||
if IsLinkToLocalFile then
|
||||
Operation := TFileSystemFileSource.GetFileSource.CreateExecuteOperation(
|
||||
aFileCopy,
|
||||
aFile.Path,
|
||||
'open') as TFileSourceExecuteOperation
|
||||
else
|
||||
Operation := aFileView.FileSource.CreateExecuteOperation(
|
||||
aFileCopy,
|
||||
aFileView.CurrentPath,
|
||||
'open') as TFileSourceExecuteOperation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue