mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
UPD: Execute operation for WfxPluginFileSource
This commit is contained in:
parent
5674a05dfc
commit
2611dcac8d
3 changed files with 9 additions and 4 deletions
|
|
@ -82,8 +82,11 @@ begin
|
|||
// CopyOut file to temp file system and execute
|
||||
end;
|
||||
fseorSymLink:
|
||||
// change directory to new path (returned in Operation.ExecutablePath)
|
||||
DebugLn('Change directory to ', Operation.ExecutablePath);
|
||||
begin
|
||||
// change directory to new path (returned in Operation.ExecutablePath)
|
||||
DebugLn('Change directory to ', Operation.ExecutablePath);
|
||||
aFileView.FileSource.CurrentPath:= Operation.ExecutablePath;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(Operation);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ begin
|
|||
Attributes := FindData.dwFileAttributes;
|
||||
Size := (Int64(FindData.nFileSizeHigh) * MAXDWORD) + FindData.nFileSizeLow;
|
||||
ModificationTime := FileTimeToDateTime(FindData.ftLastWriteTime);
|
||||
FIsLinkToDirectory := FPS_ISLNK(FindData.dwFileAttributes);
|
||||
FIsLinkToDirectory := FPS_ISLNK(FindData.dwFileAttributes) and FPS_ISDIR(FindData.dwFileAttributes);
|
||||
|
||||
// Set name after assigning Attributes property, because it is used to get extension.
|
||||
Name := SysToUTF8(FindData.cFileName);
|
||||
|
|
|
|||
|
|
@ -418,10 +418,12 @@ begin
|
|||
Result:= WFX_NOTSUPPORTED;
|
||||
if Assigned(FsExecuteFile) then
|
||||
begin
|
||||
pcRemoteName:= PChar(UTF8ToSys(sFileName));
|
||||
pcRemoteName:= GetMem(MAX_PATH);
|
||||
StrPCopy(pcRemoteName, UTF8ToSys(sFileName));
|
||||
Result:= FsExecuteFile(0, pcRemoteName, PChar(UTF8ToSys(sVerb)));
|
||||
if Result = FS_EXEC_SYMLINK then
|
||||
sNewPath:= SysToUTF8(pcRemoteName);
|
||||
FreeMem(pcRemoteName);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue