mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: FTP - opens incorrect path when quick connection used (issue #1654)
(cherry picked from commit 28152ec7f9)
This commit is contained in:
parent
c536bfbd59
commit
3e89b9cb95
1 changed files with 15 additions and 13 deletions
|
|
@ -420,10 +420,9 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function QuickConnection: Boolean;
|
||||
function QuickConnection(out FtpSend: TFTPSendEx): Boolean;
|
||||
var
|
||||
Index: Integer;
|
||||
FtpSend: TFTPSendEx;
|
||||
Connection: TConnection;
|
||||
begin
|
||||
Result:= ActiveConnectionList.IndexOf(cQuickConnection) >= 0;
|
||||
|
|
@ -728,13 +727,9 @@ begin
|
|||
begin
|
||||
if not FtpConnect(asFileName, FtpSend) then
|
||||
Result := FS_EXEC_OK
|
||||
else
|
||||
begin
|
||||
wsFileName := FtpSend.ServerToClient(FtpSend.GetCurrentDir);
|
||||
wsFileName := SetDirSeparators(RemoteName + wsFileName);
|
||||
StrPLCopy(RemoteName, wsFileName, MAX_PATH);
|
||||
Result := FS_EXEC_SYMLINK;
|
||||
end;
|
||||
else begin
|
||||
Result := FS_EXEC_SYMLINK;
|
||||
end;
|
||||
end
|
||||
else // special item
|
||||
begin
|
||||
|
|
@ -745,12 +740,19 @@ begin
|
|||
end
|
||||
else if asFileName = cQuickConnection then
|
||||
begin
|
||||
if QuickConnection then
|
||||
Result := FS_EXEC_SYMLINK
|
||||
else
|
||||
Result := FS_EXEC_OK;
|
||||
if not QuickConnection(FtpSend) then
|
||||
Result := FS_EXEC_OK
|
||||
else begin
|
||||
Result := FS_EXEC_SYMLINK;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if (Result = FS_EXEC_SYMLINK) then
|
||||
begin
|
||||
wsFileName := FtpSend.ServerToClient(FtpSend.GetCurrentDir);
|
||||
wsFileName := SetDirSeparators(RemoteName + wsFileName);
|
||||
StrPLCopy(RemoteName, wsFileName, MAX_PATH);
|
||||
end;
|
||||
end; // root path
|
||||
end // Verb = open
|
||||
else if Pos('chmod', UnicodeString(Verb)) = 1 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue