If you rename a folder with loads of data (it should have metadata), the MetadataMover::updateMetadata function would sometimes skip a resource or two. This doesn't always happen. Just occasionally. Look at the output -<br>
<br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: r -> <b> QUrl( "nepomuk:/res/0887efd7-b6ab-4acf-8f0a-74ed7106c6ed" )</b><br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: url -> <b>KUrl("file:///home/vishesh/Index_LOO/Phonemusic/19.mp3")</b><br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: KUrl("file:///home/vishesh/Index_LOO/Phonemusic/19.mp3") -> KUrl("file:///home/vishesh/Index_L/Phonemusic/19.mp3")<br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: Old Resource Exists<br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: r -> <b>QUrl( "nepomuk:/res/b9f11a5b-cbe3-4797-9fe0-0f293a215a9e" )</b><br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: url -> <b>KUrl("file:///home/vishesh/Index_LOO/Phonemusic/19.mp3")</b><br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: KUrl("file:///home/vishesh/Index_LOO/Phonemusic/19.mp3") -> KUrl("file:///home/vishesh/Index_L/Phonemusic/19.mp3")<br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: Old Resource Exists<br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: r -> QUrl( "nepomuk:/res/38616b7c-9540-46de-aa5c-e12971cac64d" )<br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: url -> KUrl("file:///home/vishesh/Index_LOO/Phonemusic/22.mp3")<br>nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: KUrl("file:///home/vishesh/Index_LOO/Phonemusic/22.mp3") -> KUrl("file:///home/vishesh/Index_L/Phonemusic/22.mp3")<br>
nepomukfilewatch(10425)/nepomuk (filewatch service) Nepomuk::MetadataMover::updateMetadata: Old Resource Exists<br><br>In the second case. The resource <b>nepomuk:/res/b9f11a5b-cbe3-4797-9fe0-0f293a215a9e </b>actaully has a nie:url of <b>file:///home/vishesh/Index_L/Phonemusic/20.mp3</b>. This was kinda difficult to track down, but the solution is fairly simple, and was mentioned in the Soprano::QueryResultIterator documentation.<br>
<br><div style="margin-left: 40px;">Many backends do lock the underlying Model during iteration. Thus, <br>it is always a good idea to cache the results if they are to be used<br>to modify the model to prevent a deadlock:<br>
<br></div>I really should read the documentation more thoroughly.<br><b><br>Other things :</b><br><br>1. The kinotify currently tracks hidden files as well. Why is that? Tracking hidden files means you track all kind of temporary files and are alerted when they are altered. It makes debugging a million times harder. It's just a matter of changing <b>KInotify::Private::watchHiddenFolders</b> to false. If you don't agree with me, then can we please make it configurable? <br>
<br>2. Minor optimization on <b>MetadataMover::updateMetadata</b> -> Patch! <br><br>- Vishesh Handa<br>