libtracker-miner: Fix lookup of already interned files
This code had several wrongs here: - The tracker_file_system_is_file_interned got the check_fs parameter wrong, creating an additional copy of the file. This would be inocuous as the later lookup would succeed, except - The extra copy of the file was being leaked - And actually the later lookup is somewhat superfluous if we are checking the NodeLookupData. We can shortcircuit lookup of files already interned in this TrackerFileSystem even further. This all is fixed now, the tracker_file_system_is_file_interned() function got open coded in the caller function so we can perform the fast path, the check has been corrected, and even if we would fall through the paths that do need a copy, it wouldn't be leaked.
Showing with 13 additions and 18 deletions