Change the names of the temporary files to something more difficult for other KDE programs to create.
Remove the asserts.
In the very unlikely situation when the preview temporary file has been replaced by other temporary file, nothing can be done to avoid to delete the file.
Details
Details
- Reviewers
dfaure - Group Reviewers
Frameworks
With a lot of images in the trash, while dolphin create the previews, empty the trash. (It can take a while, around 3000 images, until it asserts).
Before: a crash in the second assert (Is a file?), because the temporary file was already deleted, therefore it is not a file.
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
The more I try to understand my own explanations, the less I agree with my past me.
- Reading again the QTemporary documentation, without anything, the constructor creates a temporary file in the temp directory with prefix the application name.
- Why would the temporary file be deleted if the trash is being emptied?
- Unless KIO::file_copy closes the file if the origin file to be copied is not available. If it is the case, a comment is needed.
- Why would the temporary file be deleted if the trash is being emptied?
Also the asserts were modified by commit 7ce34436a0387f3620e3f47ea7252d151e839776