Restore the warning dialog when a non-existent file is encountered in the listDir loop.
Details
Diff Detail
- Repository
- R320 KIO Extras
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
smb/kio_smb_browse.cpp | ||
---|---|---|
316 | The return value of the lambda is never used, can't we just use a void function? |
smb/kio_smb_browse.cpp | ||
---|---|---|
308 | listDir() is already big enough, I think we should probably make this lambda a proper private method. |
Instead of hardwiring ENOENT and ENOTDIR errnos provide a more generic function that will generate a warning if any from a list of errors occurs.
smb/kio_smb_browse.cpp | ||
---|---|---|
108 | There is one argument missing (the error). But I think this method should just be reportWarning(int error) with a switch (like in reportError()) that converts ENOENT and friends to user-friendly sentences. | |
384–388 | Actually what I meant was something like: if (int err = browse_stat_path(m_current_url, udsentry) { reportWarning(err); } It is slightly more verbose than your approach, but imho the code becomes easier to understand. |
smb/kio_smb_browse.cpp | ||
---|---|---|
384–388 | Sorry, this should actually be: const int err = browse_stat_path(m_current_url, udsentry); if (err == ENOENT || err == ENOTDIR) { reportWarning(err); } |