D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
This revision was automatically updated to reflect the committed changes. Closed by commit R320:75ee4dfb4042: Add a specific error string for ENOTEMPTY return code. (authored by madcatx). REPOSITORY R320 KIO Extras CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15871?vs=42807=43119 REVISION DETAIL https://phabricator.kde.org/D15871 AFFECTED FILES smb/kio_smb_browse.cpp To: madcatx, elvisangelaccio, sitter, dfaure Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 To: madcatx, elvisangelaccio, sitter, dfaure Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
madcatx updated this revision to Diff 42807. madcatx added a comment. Changed the KIO error code from ERR_INTERNAL to more specific ERR_CANNOT_RMDIR. REPOSITORY R320 KIO Extras CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15871?vs=42645=42807 REVISION DETAIL https://phabricator.kde.org/D15871 AFFECTED FILES smb/kio_smb_browse.cpp To: madcatx, elvisangelaccio, sitter Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
madcatx added a comment. Ah, sorry, apparently there is ERR_CANNOT_RMDIR and ERR_COULD_NOT_RMDIR which translate to the same value with the latter being deprecated. I'll update the patch to use ERR_CANNOT_RMDIR. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 To: madcatx, elvisangelaccio, sitter Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
madcatx added a comment. Well, this (https://api.kde.org/frameworks/kio/html/deprecated.html#_deprecated15) marks KIO::ERR_COULD_NOT_RMDIR as deprecated. Is there an alternative I should use instead? REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 To: madcatx, elvisangelaccio, sitter Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
dfaure added a comment. kio_file returns KIO::ERR_CANNOT_RMDIR when trying to delete a non-empty directory, maybe kio_smb could do the same? Although I see that the above isn't dependent on the command being executed But well, is there any other operation that would return ENOTEMPTY? If not, then ERR_CANNOT_RMDIR would be better IMHO (so KIO code or app code can check for it, if needed). REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 To: madcatx, elvisangelaccio, sitter Cc: dfaure, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
broulik added a reviewer: sitter. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 To: madcatx, elvisangelaccio, sitter Cc: kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
D15871: Add a specific error string for ENOTEMPTY return code in SMB slave.
madcatx created this revision. madcatx added a reviewer: elvisangelaccio. Herald added projects: Dolphin, Frameworks. Herald added subscribers: kfm-devel, kde-frameworks-devel. madcatx requested review of this revision. REVISION SUMMARY ENOEMPTY return code may be a valid return code from i.e. smbc_rmdir(). The current error reporting code lets such an error code fall through to the default report case, leading to confusing information reported back to the user. This patch adds such a case branch. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D15871 AFFECTED FILES smb/kio_smb_browse.cpp To: madcatx, elvisangelaccio Cc: kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp