UPD: Execute operation for WfxPluginFileSource

This commit is contained in:
Alexander Koblov 2009-10-12 14:05:09 +00:00
commit 2611dcac8d
3 changed files with 9 additions and 4 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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;