bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
3.89k stars 224 forks source link

Add mechanism to exclude files from fastcheck (to work around MS Outlook/Windows bug of changing content without changing file size or timestamp) #196

Open adam3e8 opened 6 years ago

adam3e8 commented 6 years ago

On Windows using Microsoft Outlook, macros are saved in %appdata%\Microsoft\Outlook\VbaProject.OTM file. I want to synchronize this file across multiple systems, so I added a path to this file, like normal. I found that Unison was not identifying the file as being modified, even when it was. After some searching, I found that Outlook will update this file, but keep the file size and timestamp the same (eventually it'll increase the size, but then it'll use that new size even with subsequent updates). Reading through the Unison manual, I believe this is because Unison is using fastcheck. I don't want to completely disable fastcheck, as it normally works correctly. It seems that fastcheck is always disabled for .xls or .mpp files. I'm not sure if all .OTM files should be included in the excluded-from-fastcheck list, or if users should be able to specify files to be excluded. Automatically excluding .otm files will probably make it easier for other users that might run into the same issue.

bcpierce00 commented 6 years ago

Have you confirmed that disabling factcheck gives the behavior you want?

adam3e8 commented 6 years ago

Yes, if I set "fastcheck = false" then the VbaProject.OTM is identified as being changed (but the scanning is much slower).

bcpierce00 commented 6 years ago

I guess automatically excluding .otm files is both simpler and more user-friendly.

gdt commented 1 year ago

If there is already a workaround for this MS bug in terms of cls/mpp, it seems ok to add .OTM, and I would consider a PR.