<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10663" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>"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.</p>

<p>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.</p>

<p>Pausing and doing nasty things will never be safe, I don't think we need to worry about that.</p>

<p>I think all you have to do is go one more step down the stack :-)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10663" rel="noreferrer">https://phabricator.kde.org/D10663</a></div></div><br /><div><strong>To: </strong>dmitrio, Frameworks, dfaure<br /><strong>Cc: </strong>ngraham, anthonyfieroni, meven, Frameworks, michaelh<br /></div>