LibHac icon indicating copy to clipboard operation
LibHac copied to clipboard

CoreFX does not support the archive bit on non-Windows platforms, leading to switchfs being broken entirely

Open leo60228 opened this issue 6 years ago • 4 comments

https://github.com/dotnet/corefx/blob/da3ba7ebe34771dde769b65dfb7f78fa55a5abb6/src/System.IO.FileSystem/src/System/IO/FileStatus.Unix.cs#L67-L157

leo60228 avatar Jun 30 '19 18:06 leo60228

switchfs gives a warning that the archive bit is not set, sets it (which silently fails), and then itself silently fails due to the archive bit not actually getting set.

leo60228 avatar Jun 30 '19 18:06 leo60228

It may be useful to ignore the archive bit on non-Windows, and use heuristics instead.

leo60228 avatar Jun 30 '19 18:06 leo60228

You could also manually support the archive bit by using FFI. http://man7.org/linux/man-pages/man2/ioctl_fat.2.html

leo60228 avatar Jun 30 '19 18:06 leo60228

Opened an issue at dotnet/corefx#39274, and a PR for a partial workaround at #71

Thealexbarney avatar Jul 08 '19 04:07 Thealexbarney