D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-06-28 Thread Dmitri Ovodok
dmitrio abandoned this revision. dmitrio added a comment. No, didn't work on that, sorry. I think I am better to close the revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10663 To: dmitrio, #frameworks, dfaure, ngraham Cc: kde-frameworks-devel,

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-05-19 Thread Dmitri Ovodok
dmitrio added a comment. Well, I think it would be logical to implement something like that if we intend to make copying cancelable. But we still will have to spoil the destination file if there is no enough space left (which is not always determined correctly, in fact. One example of this

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-05-01 Thread Dmitri Ovodok
dmitrio added a comment. If I understand correctly what has happened, without this patch the file at destination path existed after the operation was cancelled, and it might even not be corrupted. Still I believe that it is the **source** file that may remain after the cancellation, but not

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-05-01 Thread Dmitri Ovodok
dmitrio added a comment. Sorry, but I was not able to locate such a behavior. When cancelling an overwrite in the middle of the process I got only a partially copied file at the destination path. Tested in the latest git-stable KDE Neon, the procedure was a copying of the source file to the

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-04-26 Thread Dmitri Ovodok
dmitrio added a comment. Then I probably didn't understand what was proposed in the discussed bug report. When you start writing to the existing file the data that have been in the destination file before the operation become lost. If we want to be able to restore content of destination

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-04-25 Thread Dmitri Ovodok
dmitrio added a comment. Yes, this code is ready for review. As I described in the previous comment, there is still a question concerning handling the full disk error case: it is being handled currently in some ioslaves (at least in `file_unix`

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-03-25 Thread Dmitri Ovodok
dmitrio updated this revision to Diff 30570. REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10663?vs=27582=30570 REVISION DETAIL https://phabricator.kde.org/D10663 AFFECTED FILES src/core/filecopyjob.cpp src/core/filecopyjob.h To: dmitrio, #frameworks,

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-03-25 Thread Dmitri Ovodok
dmitrio reclaimed this revision. dmitrio added a comment. This revision now requires changes to proceed. Well, sorry, I did not expect you waiting for me. I had some new version of this patch, but thought about working on unit tests for it and never finished them. I'll upload now what I have

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-02-26 Thread Dmitri Ovodok
dmitrio abandoned this revision. dmitrio added a comment. In D10663#213898 , @dfaure wrote: > I don't see any provision for the case I mentioned, where the destination file already exists, and should therefore NOT be deleted? In fact,

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-02-22 Thread Dmitri Ovodok
dmitrio planned changes to this revision. dmitrio added a comment. It seems that the proposed patch in its current state does not fully prevent possible problems with move operation (did not catch any problems while testing, but looking at the code again I don't think that all is good with

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-02-19 Thread Dmitri Ovodok
dmitrio marked an inline comment as done. dmitrio added a comment. In D10663#209708 , @meven wrote: > Add this to your commit message > FIXED-IN: 5.44 Thank you, added it to the description. In D10663#209711

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-02-19 Thread Dmitri Ovodok
dmitrio updated this revision to Diff 27582. dmitrio edited the summary of this revision. dmitrio added a comment. Add a flag which turns off cleaning up on job cancel. Use m_currentDestURL instead of obtaining the destination file name from an iterator. REPOSITORY R241 KIO CHANGES

D10635: Bug 383764: remove last file being copied/moved when the action was canceled or when the disk was full

2018-02-19 Thread Dmitri Ovodok
dmitrio added a comment. I have also done some work on this issue, and my solution for this includes mechanism that should avoid deletion of existing data. I have uploaded my proposal to Phabricator too — hope it will be useful. REPOSITORY R241 KIO

D10663: Remove a partially copied file if copyjob was cancelled in the middle of file copying

2018-02-19 Thread Dmitri Ovodok
dmitrio created this revision. dmitrio added a project: Frameworks. dmitrio requested review of this revision. REVISION SUMMARY BUG: 383764 Remove a partially copied file if copyjob was cancelled in the middle of file copying. File is considered to be in the process of being copied