Skip to content

v2.1.1

Latest

Choose a tag to compare

@0xLaileb 0xLaileb released this 28 Sep 03:00

Fixed

  • GetAllDataSection now supports the empty [] section. Keys written with a null section go to [], but GetAllDataSection threw ArgumentException for a null or empty section, so those entries could not be listed. GetAllDataSection() / GetAllDataSection(null) now returns them, consistent with every other method. GetAllSections still does not list [].
  • README and IntelliSense docs now match the actual behavior. Everything below was verified against the Windows API and is now covered by tests:
    • On read, Windows trims whitespace around values and removes one pair of surrounding quotes ("quoted" is read back as quoted). Trailing whitespace of defaultValue is trimmed too.
    • ReadInt returns defaultValue for an empty value, uses only the leading number (12abc gives 12), and overflows silently outside the int range.
    • DeleteKey / DeleteSection return true when there is nothing to delete, and create a missing file.
    • GetAllDataSection skips comment lines and returns lines without = as they are.
    • The ANSI workaround is corrected: an empty file is converted to UTF-16, so a legacy ANSI file must be created with content.
    • IntelliSense no longer refers to private constants; ReadBool documents its ArgumentException.
  • The table of contents links on nuget.org now work (the heading anchors differed between GitHub and NuGet).

Build

  • CI uses Node 24 versions of the GitHub actions (no more Node 20 deprecation warnings).
  • Package validation now compares against 2.1.0.

Full Changelog: 2.1.0...2.1.1