3 ms·
Why on earth is that a driver-level feature?
by Animats 4y ago
Why on earth is that a driver-level feature?
- mmastrac 4y agoWhere else would it be appropriate? Either you give every application special knowledge of both dotfiles and NTFS, or you give the filesystem special knowledge of dotfiles. Hypothetically you could write a special daemon that listened for all filesystem events on NTFS filesystems and set this attribute for any created dotfile, but that's incredibly roundabout for one feature.
- Animats 4y ago> Where else would it be appropriate? In the file picker and "Files" utility. "Files" already has a "Show hidden files" setting. Most applications now use a common file picker, because the file picker now has some security privileges - it can give the application the privilege to access a file otherwise not allowed.
- mmastrac 4y agoUnfortunately, the file picker doesn't create most dotfiles, and the point of the "hidden" attribute is to make them invisible on Windows which doesn't have this logic baked in. I understand the logic of having display functionality in the file picker, but what are the chances that we can collectively convince Windows Shell32 developers that explorer.exe needs to display files prefixed with dots as hidden? I think we're both on the same page that it's a hack, but it's a practical hack in that it avoids the need to involve unrelated third parties.
- selfhoster11 4y agoI think the former is a reasonable solution. For example, Nautilus will honour both filenames starting with a ., and all files listed inside a file named `.hidden` in a directory. Adding a third mechanism to hide files is not a big stretch.
- phendrenad2 4y agoIt's not a reasonable solution because you, nor I, nor the collected users of Linux, have access to or authority to change every Windows program.
- mistrial9 4y agoMicrosoft engineering have different marching orders than hands-on 0-transparent-0 OS coders, and this yet another indication of it IMHO
- pjc50 4y agoWhere are Microsoft engineering involved in this? It's developed by Paragon Software for Linux.
- jeroenhd 4y agoOn Linux, the general expectation is that files starting with a dot are invisible. This started out as a bug in an attempt to hide . and .. from the output of ls but became industry standard for Unix derived systems. This is noot the case on NTFS (and probably other filesystems) as it has its own way to mark a file as hidden. This is a workaround to bring Linux behaviour into a non-Linux filesystem by adding the hidden flag based on the file name rather than the file attributes. I'm sure this will fix all kinds of compatibility issues with applications using lower level APIs for file access and enumeration. It's a non-standard workaround, though, so it makes sense to put it in a mount flag.
- mjg59 4y agoLinux pays no attention to the hidden attribute. But when you create a dotfile under Linux the clear intent is that the file should be hidden. Linux tooling knows to hide dotfiles by default, but Windows doesn't. So, this patch sets the hidden attribute when you create a dotfile under Linux. If you then mount the same filesystem under Windows the dotfiles will be hidden. Given that Linux userland tooling knows (in general) nothing about NTFS, and this hidden attribute is NTFS-specific, where would you put it other than in the driver?