This patch fixes two cases where invalid KTMPFile objects would be treated as
valid. In particular, this would manifest in KIO::stat() and KIO::mimetype()
returning without error when they, in fact, should do. One would note that in
the rest of the code, KMTPFile objects that are received via
KMTPStorageInterface::getFileMetaData() always have a isValid() check applied
before use. The two previously mentioned functions, incorrectly, do not have
this check applied. This patch simply adds these necessary checks.
Details
Details
KIOFuse uses KIO::stat() to complete a lookup. Before this patch lookup would
always succeed and this was determined to be because stat would always succeed.
This bug could be easily found as tab completion would never work correctly.
Trying to tab complete would seem to add what was already typed in to the
directory. With this patch applied, lookup no longer always succeeds and tab
completion now works.
Diff Detail
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.