mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0000455] Copying a directory to FTP and it already exists displays "Unknown error" message
This commit is contained in:
parent
6e6cef0f64
commit
afe3e29b0f
1 changed files with 9 additions and 1 deletions
|
|
@ -807,10 +807,18 @@ function FsMkDir(RemoteDir: PAnsiChar): BOOL; dcpcall;
|
|||
var
|
||||
sPath: AnsiString;
|
||||
FtpSend: TFTPSendEx;
|
||||
sOldPath: AnsiString;
|
||||
begin
|
||||
Result := False;
|
||||
if GetConnectionByPath(RemoteDir, FtpSend, sPath) then
|
||||
Result := FtpSend.CreateDir(sPath);
|
||||
begin
|
||||
sOldPath := FtpSend.GetCurrentDir;
|
||||
if FtpSend.ChangeWorkingDir(sPath) then
|
||||
Result := FtpSend.ChangeWorkingDir(sOldPath)
|
||||
else begin
|
||||
Result := FtpSend.CreateDir(sPath);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function FsRemoveDir(RemoteName: PAnsiChar): BOOL; dcpcall;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue