Hey void, sometimes hitting CTRL+F5 to reindex doesn't work. Using 1.5.0.1366a.
To reproduce..
I have a file tagged in XYplorer with TAG_A.
Index the file in Everything (with CTRL+F5) and the TAG_A is brought into the Tags field.
Now I remove TAG_A from the file in XYplorer and tag it with TAG_B instead.
Index the file in Everything (with CTRL+F5) and TAG_A is removed as expected.. but then TAG_B is not brought into the Tags field. It won't be brought in until Everything is File->Exit'd and opened again and the file is CTRL+F5 refreshed.
Possibly the file isn't properly closed. And actually if I go into Notepad++ and open my tag.dat file, make a modification & save it. Its like the file is reset and able to be read by Everything again, because CTRL+F5'ing works again.
When you change a tag in XYplorer, does your %APPDATA%\XYplorer\tag.dat update?
Does the Date Modified field change on this file?
Everything currently caches your tag.dat and reloads it when the date modified field changes.
void wrote: ↑Tue Jan 09, 2024 7:04 am
Could you please check something for me..
When you change a tag in XYplorer, does your %APPDATA%\XYplorer\tag.dat update?
Does the Date Modified field change on this file?
Everything currently caches your tag.dat and reloads it when the date modified field changes.
Upon tagging a file, the date modified of tag.dat is immediately updated and the file contains the new tagging data. However, you may be right that the file is held open.
Edit:
Sysinternals Handle tool doesn't show tag.dat being held open by any program.
Worth noting that XYplorer has a file system watcher on the tag.dat file to reload in case there are any manual changes. Hopefully that doesn't conflict if you've also got a watcher on the same file.
Saving the tag.dat file with no modifications using Notepad++ solves the caching problem every time.
You cannot request an access mode that conflicts with the sharing mode that is specified by the dwShareMode parameter in an open request that already has an open handle.
The logs show XYplorer still writing to this file after you hit F5.
The logs show Everything fails to read your tags.dat with error code: 32 (sharing violation)
Everything opens the file with FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE.
XYplorer is likely saving to this file without FILE_SHARE_READ.
Everything will be unable to read your tags.dat until XYplorer finishes writing to this file.
The next Everything alpha update will no longer clear your tags.dat cache when XYplorer is still writing to this file.
However, you'll need to hit F5 after XYplorer has finished writing to this file.
You'll no longer need to exit Everything in the next alpha update, you'll just have to hit F5 again.
I'll have an update soon and post here again.
For now, the best option is to give XYplorer a few seconds to write changes to your tag.dat before hitting F5 in Everything.
I will consider a short timeout value.
Maybe a maximum of 1 second to keep retrying on error 32.
How large is your tags.dat?
My tag.dat is around 3MB. The file is written to very quickly by XYplorer. However, I have waited a full minute before attempting CTRL+F5 and it still fails.
Please re-read my last post. I was trying to explain that I think you have to try opening the file twice. First attempt should use GENERIC_READ. Then second attempt should use both GENERIC_READ and GENERIC_WRITE. The reason you have to try both is because of Microsoft's documentation that says "You cannot request an access mode that conflicts with the sharing mode that is specified by the dwShareMode parameter in an open request that already has an open handle."
I know the file is able to be opened and read because Notepad++ can read the file and Everything can't.
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
2024-01-10 22:46:55.214: CreateFileW(): 32: Failed to open file C:\Users\dougb\AppData\Roaming\XYplorer\tag.dat
But yes it appears to be working great. Thanks for your time spent on this. It was an annoying issue to workaround.
I might have misunderstood, but this sounds to me like a workaround for an issue that needs to be reported on the XYplorer forum, so its developer can fix it?
Previous versions would clear Everything's tags.dat cache on Ctrl+F5
If Everything failed to read your modified tags.dat, Everything's tags.dat cache would remain cleared.
Everything would also remember the tags.dat modified timestamp and not attempt to update again.
1367a+ will only clear Everything's tags.dat cache after successfully reading the modified tags.dat.
Everything will only remember the tags.dat modified timestamp after successfully reading the modified tags.dat.
This allows Everything to keep retrying to read your tags.dat for changes if it is currently locked.