mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: FTP - assign connection remote path as virtual drive root (issue #1665)
This commit is contained in:
parent
7f1fb46919
commit
67c5d3a2b1
2 changed files with 9 additions and 1 deletions
|
|
@ -119,6 +119,7 @@ type
|
|||
constructor Create(const Encoding: String); virtual; reintroduce;
|
||||
function Login: Boolean; override;
|
||||
function Clone: TFTPSendEx; virtual;
|
||||
function GetCurrentDir: String; override;
|
||||
procedure CloneTo(AValue: TFTPSendEx); virtual;
|
||||
procedure ParseRemote(Value: string); override;
|
||||
function FileExists(const FileName: String): Boolean; virtual;
|
||||
|
|
@ -769,6 +770,11 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function TFTPSendEx.GetCurrentDir: String;
|
||||
begin
|
||||
Result:= CeUtf16ToUtf8(ServerToClient(inherited GetCurrentDir));
|
||||
end;
|
||||
|
||||
function TFTPSendEx.FileExists(const FileName: String): Boolean;
|
||||
begin
|
||||
Result:= (Self.FileSize(FileName) >= 0);
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ end;
|
|||
function FtpConnect(const ConnectionName: AnsiString; out FtpSend: TFTPSendEx): Boolean;
|
||||
var
|
||||
I: Integer;
|
||||
APath: String;
|
||||
APassword: String;
|
||||
Connection: TConnection;
|
||||
begin
|
||||
|
|
@ -403,7 +404,8 @@ begin
|
|||
end
|
||||
else begin
|
||||
Connection.CachedPassword:= APassword;
|
||||
LogProc(PluginNumber, MSGTYPE_CONNECT, PWideChar('CONNECT ' + PathDelim + CeUtf8ToUtf16(ConnectionName)));
|
||||
APath:= PathDelim + ConnectionName + FtpSend.GetCurrentDir;
|
||||
LogProc(PluginNumber, MSGTYPE_CONNECT, PWideChar('CONNECT ' + CeUtf8ToUtf16(APath)));
|
||||
ActiveConnectionList.AddObject(ConnectionName, FtpSend);
|
||||
if Connection.OpenSSH and (ConnectionName <> cQuickConnection) then
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue