D19080: [WIP] Make file overwrite a bit safer
    David Faure 
    noreply at phabricator.kde.org
       
    Sun Feb 17 15:45:35 GMT 2019
    
    
  
dfaure added a comment.
  Ah I see, we copy to .part only when the destination actually exists. I had missed that in my earlier comment. Makes sense, actually.
INLINE COMMENTS
> file_unix.cpp:289
> +                        ::unlink(_dest_backup.data());
> +                        orig_delete_attempted = true;
> +                        continue;
I think the naming of that bool could be improved (orig sounds like origin sounds like source, but this is about the dest).
How about
  existing_dest_delete_attempted
?
> file_unix.cpp:322
> +                    if (!_dest_backup.isEmpty() && !orig_delete_attempted) {
> +                        ::unlink(_dest_backup.data());
> +                        orig_delete_attempted = true;
.constData()  [everywhere you used .data()]
REPOSITORY
  R241 KIO
REVISION DETAIL
  https://phabricator.kde.org/D19080
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/20190217/59ac739a/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list