D14757: Warn user before copy/move operation if available space is not enough
Kai Uwe Broulik
noreply at phabricator.kde.org
Sun Sep 16 19:23:35 BST 2018
broulik added inline comments.
INLINE COMMENTS
> copyjob.cpp:887
> qCDebug(KIO_COPYJOB_DEBUG)<<"Stating finished. To copy:"<<m_totalSize<<", available:"<<m_freeSpace;
> - //TODO warn user beforehand if space is not enough
> + if (m_totalSize > m_freeSpace) {
> + q->setError(ERR_DISK_FULL);
Please check for `m_freeSpace != static_cast<KIO::filesize_t>(-1)` (`KIO::filesize_t` is `unsigned`) to avoid false errors when free space couldn't be determined
> copyjob.cpp:889
> + q->setError(ERR_DISK_FULL);
> + q->setErrorText(m_currentSrcURL.toLocalFile());
> + q->emitResult();
Can you assume `m_currentScrURL` is a local file? Perhaps use `toDisplayString`
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D14757
To: shubham, pino, dfaure, broulik, ngraham
Cc: ngraham, dfaure, pino, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180916/954ae559/attachment.html>
More information about the Kde-frameworks-devel
mailing list