Fix assert when cleaning up symlinks in PreviewJob
ClosedPublic

Authored by davidedmundson on Nov 19 2018, 2:18 PM.

Details

Summary

When previewing files in a KIOslave KIO will copy the file out to a
temporary directory and then run the preview on that.

If I have a symlink in a slave (for example trashing a symlink) the
preview job will copy the symlink to the temporary directory.

QFileInfo follows symlinks for methods like isDir(), in this case we
shouldn't assert as QFile::remove will correctly just cleanup the
symlink.

Test Plan

Created a symlink to a directory
Trashed it
Opened trash:// in dolphin with previews enabled
Used to hit an assert
Now don't

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 19 2018, 2:18 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 19 2018, 2:18 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 19 2018, 2:18 PM
dfaure accepted this revision.Nov 26 2018, 8:08 AM
This revision is now accepted and ready to land.Nov 26 2018, 8:08 AM
This revision was automatically updated to reflect the committed changes.