bcpierce00 / unison

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

Setting for Hidden Files on Windows #987

Closed AlexanderFM closed 6 months ago

AlexanderFM commented 6 months ago

It would be very good if there were parameters for Win Hidden Files and Archive attributes in Unison.

On version 2.53.3 (GUI) using Windows 11. A NAS is accessed through a SMB drive mount. Unison is set to do a simple local files sync. Files copy over and update. However, when viewing the copied files and folders on the NAS all files and subdirectory have the hidden and archive attribute. If I untick "hidden file" Unison will remark them as hidden if I update and re-sync.

Someone will say it is a problem with the mount although this was never a problem with other applications nor is it addressable. I know Unison is very Linux orientated but having the ability to define/specify Hidden File and Archive Attributes would be very powerful. This could be useful in reverse allowing users to have certain paths on the remote side marked as hidden without the source being marked as hidden.

gdt commented 6 months ago

Unison is UNIX-oriented not Linux, but indeed. My guess, without reading the sources, is that there just isn't code to address these attributes. Generally unison tries to sync, so the right behavior would be to have them match. An alternate reasonable behavior would be to ignore them on read and never set them. But perhaps they appear as POSIX extended attributes and something is going wrong.

You haven't established that unison is behaving wrong, by for example comparing using rsync and cp, and running it under the windows equivalent of ktrace to see the system calls (no, I have no idea how to do that or if it's possible).

This is phrased as a feature request, but it isn't clear enough to be implementable nor is it agreed on what should happen. Please bring up your problem on unison-users or unison-hackers and try to understand what is happening now and why --- so far without evidence for a bug or being a fully-baked feature request it isn't appropriate for the issue tracker.

AlexanderFM commented 6 months ago

Thanks for your swift reply! It is intentionally phrased as a feature request not a bug. My apologies if this is the wrong place for a feature request. I think the ability to dictate Hidden files Attributes (and archive) would be really nice to have, I think this is relevant to any network with Windows machines, even in a primarily UNIX/Linux oriented environment. Someone more qualified would be better to say how it should be implemented. If you dont think its a good idea, feel free to delete this issue. Love the work and how you keep Unison maintained ^^

gdt commented 6 months ago

Feature requests which are fully thought out are appropriate here. Discussion that leads to a crisp feature request belongs on one of the mailinglists, as should be clear from https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests which I hope you found on the way to using the issue tracker.

In this case, I don't know if you are running into a unison bug, or a bug in your file server, or something else. It doesn't make sense that these attributes would get set given what you said you were doing. If you want to figure that out you can read the debugging section in the page above. I don't think it's reasonable to add a feature which doesn't have a clear justification for being necessary on working systems, especially a Windows-only feature.

Do feel free to ask for help with your situation on the users list. That is the right venue, and the reason the wiki documents that it is the right venue is that it is the center of the community. There are fairly few subscribing to github, and we have not accepted the github modification of free software culture that github should be the center of everything.