D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying
David Faure
noreply at phabricator.kde.org
Tue Feb 27 09:01:25 UTC 2018
dfaure added a comment.
"the destination file gets deleted only if some data has been written into it" ... ah I see, that's a great solution indeed, I like it.
About moving: if the file was fully copied, (but the source not yet deleted), good catch. This requires a similar solution in FileCopyJob, i.e. one layer below (with a similar "in progress" flag that is only true while the file copy is in progress, and false as soon as it's done, i.e. before the DeleteJob). I suggest starting with that, and then in CopyJob when killing a FileCopyJob we just let it do the cleanup. As you found out, CopyJob is too high-level for this.
Pausing and doing nasty things will never be safe, I don't think we need to worry about that.
I think all you have to do is go one more step down the stack :-)
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D10663
To: dmitrio, #frameworks, dfaure
Cc: ngraham, anthonyfieroni, meven, #frameworks, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180227/248ed287/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list