D19080: [WIP] Make file overwrite a bit safer

David Faure noreply at phabricator.kde.org
Tue Feb 26 08:21:25 GMT 2019


dfaure accepted this revision.
dfaure added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> file_unix.cpp:414
> +        if (::unlink(_dest_backup.constData()) == -1) {
> +            qCWarning(KIO_FILE) << "Couldn't remove original dest" <<  _dest_backup;
> +        }

printing strerror(errno) here would help debugging why it failed

> file_unix.cpp:418
> +        if (::rename(_dest.constData(), _dest_backup.constData()) == -1) {
> +            qCWarning(KIO_FILE) << "Couldn't rename" << _dest << "to" << _dest_backup;
> +        }

printing strerror(errno) here would make sense too

REPOSITORY
  R241 KIO

BRANCH
  safe-overwrite

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/20190226/9f6a490c/attachment.html>


More information about the Kde-frameworks-devel mailing list