I'm using Delphi XE8 and SFTPCLient.DownLoad file works perfectly when overwrite is set to true. However, when set to false I get error 80 and the OnError event does not seem to fire. I tried to set a breakpoint in the OnError event but it doesn't work. I also tried using try except on e:EScSFTPError and it doesn't break either. I suspect it triggers the error somewhere in the DownLoad code?
I appreciate any assistance, I want to be able to allow the user to decide whether to overwrite the local file.
thank you
SFTPClient.DownloadFile Overwriting local file
Re: SFTPClient.DownloadFile Overwriting local file
To snip this error, you can use the following code:
Code: Select all
try
ScSFTPClient.DownloadFile(Path, Filename, False);
except
on E: EOSError do
ShowMessage('File already exists.');
end;
Re: SFTPClient.DownloadFile Overwriting local file
nope ..still does not trap the error
Re: SFTPClient.DownloadFile Overwriting local file
Please check whether the issue is reproduced on our SFTPClient demo project, that can be found in the 'Demos\SFTPClient' folder relatively to the SecureBridge demos installation path. In addition, please clarify - is the TScSFTPClient.NonBlocking proeprty set to True? If it is, then set it to False and check whether the error can be snipped.
Re: SFTPClient.DownloadFile Overwriting local file
setting the nonblocking property did it..thanks
Re: SFTPClient.DownloadFile Overwriting local file
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.