D19080: [WIP] Make file overwrite a bit safer

Chinmoy Ranjan Pradhan noreply at phabricator.kde.org
Sat Feb 16 16:23:26 GMT 2019


chinmoyr updated this revision to Diff 51875.
chinmoyr marked 4 inline comments as done.
chinmoyr added a comment.


  Removed warning message.
  Removed arg().
  Added test cases.
  Used QFile::resize().
  
  Replying to a comment:
  
  > This test is called Overwrite, and passes the Overwrite flag, but it's not actually 
  > overwriting anything (destFile doesn't exist).
  
  createTestDirectory() internally calls createTestFile() so both source and dest 
  files are created. There, using QFile, I wanted to resize the source file to make 
  sure the .part file isn't deleted before the lambda is called.

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19080?vs=51859&id=51875

BRANCH
  safe-overwrite

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

AFFECTED FILES
  autotests/jobtest.cpp
  autotests/jobtest.h
  src/ioslaves/file/file_unix.cpp

To: chinmoyr, dfaure, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190216/e4f76a5e/attachment.html>


More information about the Kde-frameworks-devel mailing list