can't move unless filename is different

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
dcornelius
Posts: 7
Joined: Tue 06 Aug 2013 19:24
Location: Portland, Oregon, USA
Contact:

can't move unless filename is different

Post by dcornelius » Fri 20 Dec 2013 15:51

Using ScSFTPClient.RenameFile, I'm uploading files to temporary folder, then moving them to the final destination folder. I've found that I get an error unless the filename is different. In otherwords if I call this:

Code: Select all

ScSFTPClient.RenameFile('/upload/temp/abc.txt', '/upload/abc.txt')
it doesn't work, but if I call this:

Code: Select all

ScSFTPClient.RenameFile('/upload/temp/abc.txt', '/upload/abc2.txt')
it does work.

Is there a different way to move files (copy/delete is not practical) or do I have to actually change the name when calling RenameFile?

Using Delphi 2010 with SecureBridge 6.1.2

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: can't move unless filename is different

Post by Dimon » Thu 26 Dec 2013 10:19

I can not reproduce the problem. Please let me know the version of your SSH server.

dcornelius
Posts: 7
Joined: Tue 06 Aug 2013 19:24
Location: Portland, Oregon, USA
Contact:

Re: can't move unless filename is different

Post by dcornelius » Tue 31 Dec 2013 04:17

I appreciate your response and I have to admit I can no longer reproduce it either! I'm embarrassed, but I'm sure I saw what I did--otherwise, why would I have programmed around it?

FWIW, the log when I connect with WinSCP says:
Server version: SSH-2.0-OpenSSH_5.6
so there's the answer to that question.

Anyway, there is no issue, it's uploading to temp folders and renaming to the main folder just fine now.

Thanks,
David Cornelius

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: can't move unless filename is different

Post by Dimon » Tue 31 Dec 2013 08:15

It is good to see that the issue has been solved. Feel free to contact us if you have any further questions about SecureBridge.

Post Reply