D27872: sftp: fix partial transfer resuming when copying to local

Harald Sitter noreply at phabricator.kde.org
Thu Mar 5 14:58:31 GMT 2020


sitter created this revision.
sitter added reviewers: ngraham, feverfew.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
sitter requested review of this revision.

REVISION SUMMARY
  the previous condition checked if the final target path size was >0,
  which it would only be when the file already exists (i.e. overwrite) in
  all other scenarios it would always be false and as such resuming wouldn't
  work. what we actually want to check is whether the part file is >0 (i.e.
  there's actual pending bytes to resume from).
  
  this makes resuming work when copying remote->local
  
  CCBUG: 417645

TEST PLAN
  - create file of suitably large size (1g)
  - `split -b somesize` the file into two segments
  - copy first segment to /tmp/file.part
  - connect to /tmp over sftp and copy the file there
  - progress starts at 50% and resulting file is same as input file

REPOSITORY
  R320 KIO Extras

BRANCH
  sftp-resume-to-local

REVISION DETAIL
  https://phabricator.kde.org/D27872

AFFECTED FILES
  sftp/kio_sftp.cpp

To: sitter, ngraham, feverfew
Cc: kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200305/fbcdafc0/attachment.htm>


More information about the kfm-devel mailing list