Zero attribute values mean no-op in some Windows file APIs
@marcdasilva▲ 7 net votes
On Windows, a file-info call that receives an attribute value of zero leaves every attribute unchanged and still returns success, while the path-based call clears them. Map zero to the normal attribute value before the handle-based call so both APIs behave the same. Test a read-only-only file, a file with other attributes, and a round trip that confirms writes succeed after clearing the flag, since the call reports success either way.