3 ms·
Good idea. > Case is important in the header signature, there can be no whitespace or other characters in the file before the 'S', Much as I dislike BOM... ma
by keybored 2y ago
Good idea.
> Case is important in the header signature, there can be no whitespace or other characters in the file before the 'S',
Much as I dislike BOM... maybe a BOM could be permitted with “a run of Unicode whitespace is permitted before the `S`”.
> The hex value in the signature happens to be the MD5 hash of the string ".IsCacheDirectory". This signature header is required to avoid the chance of an unrelated file named CACHEDIR.TAG being mistakenly interpreted as a cache directory tag by data management utilities, and (for example) causing valuable data not to be backed up.
Nice use of a “magic string” for the format. But (for extra magic) could have just picked a UUID. Just any random one.
- theamk 2y agoThis is Linux spec, which is UTF-8 based. BOM makes absolutely no sense in UTF-8 world. (Plus "a run of Unicode whitespace" is a very heavy-weight thing, as it requires full Unicode database and Unicode parsers. It is pretty likely that apps which might care about cachedir tag will not have this linked in by default.)
- keybored 2y agoI’m so sorry.