mimeTypeForFile is quite expensive (much more than QFileInfo and fetching
the timestamps from the DB), and yields the wrong type for folders.
Details
Details
- Reviewers
ngraham astippich poboiko - Group Reviewers
Baloo - Commits
- R293:4fcbfee9b669: [ModifiedFileIndexer] Use correct mimetype for folders, delay until needed
Diff Detail
Diff Detail
- Repository
- R293 Baloo
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/file/modifiedfileindexer.cpp | ||
---|---|---|
68 | Does it also changes behavior of ModifiedFileIndexer? What happened to symlinks before? |
src/file/modifiedfileindexer.cpp | ||
---|---|---|
68 | It depends on the state of the PendingFileQueue:
so, on mkdir target; mkdir test; sleep ... rmdir test; ln -s target test we get a deleted and a created event, where the latter ends up in the ModifiedFileIndexer, adding a symlink to the index. For e.g. the UnindexedFileIndexer, symlinks are omitted using QDir::NoSymlinks. That said, NewFileIndexer should also check for symlinks. |
src/file/modifiedfileindexer.cpp | ||
---|---|---|
82 | "when the folder is created,..." or "when a file is created,..."? |