unison
unison copied to clipboard
macOS: failure to propagate changes when file extension is hidden
Problem
Unison properly identifies differences but fails to propagate changes for files that have the "hide extension" box checked. An example error output:
Docs/docname.pdf
Error in setting file information:
Operation not permitted [setattrlist(/Users/<redacted>/Docs/.unison.docname.pdf.b521af74258495965fab4c7bbe5e4d22.unison.tmp)]
After unchecking the "hide extension" box, sync finishes as expected.
Setup
- Unison v2.51.2 (GUI, with Full Disk Access)
- macOS Catalina 10.15.6
- Syncing a local folder to another local folder mounted via FUSE
I don't think this is specific to the GUI. One has to determine what this "hide extension" box does at the filesystem level.
But is there a mechanism in the text ui to hide extensions? And, I don't even really understand what "hide extension" means. Does that mean that the GUI displays just "foo" when the file is really "foo.txt"?
I don't think this is specific to the GUI. One has to determine what this "hide extension" box does at the filesystem level.
The problem also occurs when using the CLI.
@gdt "hide extension" is a macOS option. I thought this was only cosmetic but it seems to impact unison somehow. In a large collection of files, you will likely have some of them with this option checked.
Thanks. I have created a macOS label, and removed the GUI label from this issue. Also lowered impact, as it seems this only affects mac, and only with a non-default config.
I find this surprising, as I would expect this feature to only affect the macOS finder, and not change the fs as seen by POSIX, but someone who uses unison and this extension hiding will have to dig in, read the code, see what the syscalls return, etc. FWIW I use text ui unison as built by pkgsrc on mac, treating it like a regular computer, and haven't noticed issues.
Unison syncs FinderInfo. So this "hide extension" could be a flag within FinderInfo or somehow related to FinderInfo.
Fixing this requires that someone figures out what exactly "hide extension" does in FinderInfo and/or other file attributes.
@thefonseca was the extension hidden on the source file or the target file or on both?
feedback label set to retest with latest release or master. This report is too unclear to act on, and it presumes too much mac knowledge. Please clarify what mac option is being set where and what the semantics are.
For what it's worth, I just tried toggling the "Hide Extension" Finder flag in a file on my backup folder. Unison correctly identified a changed property and propagated it to the replica. (Both replicas are on macOS, one is accessed remotely via ssh.) I suggest @thefonseca tries to find a well-defined test case where unison behaves incorrectly.
feedback label has been on more than 30 days, and the newest report of misbehavior is with 2.51.2. Please feel free to open with a repro recipe if this is still an issue with 2.53.1 or later on both sides.