hallas added a comment.

  In D19170#418234 <https://phabricator.kde.org/D19170#418234>, @dfaure wrote:
  
  > I think it's an unwanted fact that the chmod job runs in parallel with the 
del job.
  >  A "return" after creating the chmod job would fix all this.
  >
  > But of course it should be possible to have two concurrent subjobs (one on 
dest, one on src), this whole issue just makes me realize that it makes the 
error handling more tricky ;-)
  >
  > If we want to keep these two running in parallel, we need to fix 
FileCopyJob to kill the running subjob when emitting the error from the other 
one.
  >  Would this fix it?
  >  http://www.davidfaure.fr/2019/filecopyjob.cpp.diff
  
  
  Hi @dfaure  I was actually thinking of the same fix ;)
  
  I have updated the diff with your suggested fix, but I have also added the 
"reverse" case, so if the chmod reports an error and we have a del job running, 
kill the del job. If the del job reports an error and we have a chmod job 
running, kill the chmod job. This pattern of error handling is actually the 
same as with the getjob/putjob. I have tested the fix and can see that it 
solved the problem!

REPOSITORY
  R241 KIO

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

To: hallas, #frameworks, elvisangelaccio, dfaure
Cc: cfeck, dhaumann, kde-frameworks-devel, michaelh, ngraham, bruns

Reply via email to