Topic "Proper File Resume"

Author Message
tmp

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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 Smile

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?
_________________
Martin Prikryl
tmp

Guest


hehe I am calm Smile

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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
_________________
Martin Prikryl
tmp

Guest


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

Thanks
tmp

Guest


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

Guest


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

Thanks
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License