Hi.<br><b><br>BUG :</b><br><br>I was going through the Strigi Service, and I noticed that it stores the folders to index in a service file named strigiservicerc (duh!) The problem is that the folder being watched are sometimes renamed/moved, and when that happens Strigi deletes its indexed metadata. Furthermore, if a directory in one of the indexed directories, and is moved out of it, the metadata is deleted. :-/ This all happens when the strigiservice is restarted. The culprit -&gt; Nepomuk::IndexScheduler::removeOldAndUnwantedEntries()<br>
<br>Fixing this, in my opinion, would require us to watch the indexed directories for changes. Unfortunately crappy <i>inotify</i> doesn&#39;t allow this. If a watched directory is renamed it gives us a EventMoveSelf, but doesn&#39;t tell us what it has been renamed to or where it has been moved. (I know! Stupid!) So, the only solution I can think of is to watch its parent directory, that will atleast tell us what it&#39;s been renamed to. In order to know where it has been moved to we&#39;ll need to watch everything, which is a huge resource hog (Yes, Filewatcher, I&#39;m talking about you!)<br>
<b><br>PATCHES :</b><br><br>For starters, we need to move the kinotify class to a better location, so that it can be used by both the filewatcher, and strigi.<br><br>In KINotify, I found a couple of functions to be implemented inefficiently ( O(n), when it can be close to O(1). ) So, I optimized it a little bit. The problem came while optimizing <i>KInotify::removeWatch( const QString&amp; path )</i>. It currently removes all watches who&#39;s paths start with path, which doesn&#39;t seem right. It should <i>only</i> remove the watch corresponding to the given path. The full optimization patch does this.<br>
<br>I&#39;ve tried to hack a solution to the <b>BUG</b>. This is just a preliminary patch! I created a new class called ConfigFolderWatcher (got a better name?). I didn&#39;t want to clutter up the <i>strigiservice</i> class. In order for this class to work I copied the kinotify class from the filewatch service (Temp. solution, you&#39;ll need to do the same) The current Patch works perfectly for renaming and moving to a sibling directory. But not for, well, anything else. Look at the source code! The filewatcher service suffers from a somewhat same problem. <br>
<b><br><br>SCRIPTS :</b><br><br>I usually tend to write scripts for stuff I do frequently, and I wrote a couple for Nepomuk. They are available over here -&gt; <a href="http://pastebin.com/pxDVSWWQ">http://pastebin.com/pxDVSWWQ</a> . The service ones aren&#39;t perfect but they&#39;re useful. Has anyone else written any scripts which may be useful? If so, please share them! :-)<br>
<br>Thanks<br><br>- Vishesh Handa<br><br><br>