Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

tmp

heh just noticed your email, damn you are fast ;P
will go and test it.

Thanks
tmp

Hey,

took a quick look at the src code:

@SftpFileSystem.cpp Line 3062 in TSFTPFileSystem::SFTPSource

if (DestFileExists)
{
OpenParams.DestFileSize = File->Size;
FileParams.DestSize = OpenParams.DestFileSize;
FileParams.DestTimestamp = File->Modification;
DestRights = *File->Rights;
delete File;
File = NULL;

//add
ResumeOffset = OpenParams.DestFileSize;
ResumeTransfer = SFTPConfirmResume(DestFileName,
ResumeOffset > OperationProgress->LocalSize, OperationProgress);
}

and I guess add to Line 3732 in TSFTPFileSystem::SFTPSink ( what does SFTPSink do anyway?)

FTerminal->LogEvent("Checking existence of the file.");
if (FileExists(DestFullName))
{
FTerminal->OpenLocalFile(DestFullName, GENERIC_WRITE,
NULL, &LocalHandle, NULL, NULL, NULL, &ResumeOffset);

ResumeTransfer = SFTPConfirmResume(DestFileName,
ResumeOffset > OperationProgress->TransferSize, OperationProgress);

Well it shouldnt take much to make it all work proper, and it could replace the alternate method altogether.
Damn I hate C++ but you are doing a great job Martin, been using WinSCP since ~2000

Thanks alot
tmp

Thanks alot! Will do that.
I really think this is a wise thing to do as it simplifies things and is more logical.

Thanks
martin

tmp wrote:

Well I use mostly FTP whenever I can to sync files but depending
where I am at the FTP can be blocked and then I use winscp and
if the transfer got aborted using FTP and I am at work using winscp
it gets tedious to resume because ftp client doesnt add no .filepart extension....

OK, Send me an mail and I'll send you back updated version soon, once it's implemented.
tmp

hehe I am calm :)

Well I use mostly FTP whenever I can to sync files but depending
where I am at the FTP can be blocked and then I use winscp and
if the transfer got aborted using FTP and I am at work using winscp
it gets tedious to resume because ftp client doesnt add no .filepart extension....
martin

Re: Proper File Resume

tmp wrote:

The alternative method to resume is really annoying if you have many files to resume.
Why cant the destination file's size be checked with the source file and if the destination file is smaller ask to resume and have option to always resume.

OK, calm down, it can be. Maybe :-)

But anyway, I wonder what is your "use case"? How does it happen that you have several files to be resumed without the ".filepart" extension?
tmp

Proper File Resume

Hi,

I would like to see a better workin file resume when files to be resumed
dont have a .filepart extension. The alternative method to resume is really annoying if you have many files to resume.
Why cant the destination file's size be checked with the source file and if the destination file is smaller ask to resume and have option to always resume.

Example:

if(isFilepart(destFile))
{
...resume as usual, file has a .filepart extension
}
else if(exist(destFile) && (size(destFile) < size(srcFile)))
{
...resume
}

Thank you