Bug 316158

Summary: New files are not being indexed until after reboot
Product: [Unmaintained] Active Reporter: Thomas Pfeiffer <thomas.pfeiffer>
Component: GeneralAssignee: active
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version: Integration   
Target Milestone: unscheduled   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Pfeiffer 2013-03-05 10:29:43 UTC
When I copy files from a USB stick to the device, they do not show up anywhere (Files, Add Items) until after I reboot the device.

Reproducible: Always

Steps to Reproduce:
1. Attach a USB device
2. Copy some files from it to your device's disk
3. Switch back to the device's disk
4. Choose the corresponding file category
4b. Open the Add Items dialog
5. Wait
6. Reboot
7. Open Files again
Actual Results:  
New files are not shown until reboot

Expected Results:  
Files should be shown after a short indexing delay
Comment 1 Thomas Pfeiffer 2013-03-26 21:20:16 UTC
File indexing is not triggered by newly added files. De- and reactivating the indexer from Desktop Search settings does trigger indexing, though.
Comment 2 Marco Martin 2013-04-11 19:31:30 UTC
Git commit 0b5a17ee52780fdf2e49f82ad0c541052d8ff0a5 by Marco Martin.
Committed on 11/04/2013 at 21:27.
Pushed by mart into branch 'master'.

consider "old" files

when a file that has a very old modification time is copied in an indexed folder, checking the modification time isn't enough.
we have to check the modification time of the folder *and* of the file, then index the file if any of them is recent.
in this case it catches both the cases an already existing file has been modified or the case when an "old" file gets copied there (in that case is the directory modification time that catches it)

M  +4    -2    services/filewatch/nepomukfilewatch.cpp

http://commits.kde.org/nepomuk-core/0b5a17ee52780fdf2e49f82ad0c541052d8ff0a5
Comment 3 Marco Martin 2013-04-11 19:34:39 UTC
Git commit ba02058c7efe6c4acef3b3b2aef55de0afd7aaef by Marco Martin.
Committed on 11/04/2013 at 21:27.
Pushed by mart into branch 'KDE/4.10'.

consider "old" files

when a file that has a very old modification time is copied in an indexed folder, checking the modification time isn't enough.
we have to check the modification time of the folder *and* of the file, then index the file if any of them is recent.
in this case it catches both the cases an already existing file has been modified or the case when an "old" file gets copied there (in that case is the directory modification time that catches it)

M  +4    -2    services/filewatch/nepomukfilewatch.cpp

http://commits.kde.org/nepomuk-core/ba02058c7efe6c4acef3b3b2aef55de0afd7aaef
Comment 4 Thomas Pfeiffer 2013-04-12 19:23:46 UTC
I can confirm that this is fixed. Yay!