Skip to content

Error parse values #347

Closed
Closed

Description

@Shagrat2

Version

1.66.6

Describe the bug

If the value ends with \\
At the next load , it is glued together with the following line

A request for the "cert" key gives "Y:\\_1\\serial = 12345678"

To reproduce

[dirs]
cert = Y:\\_1\\
serial = 12345678

Expected behavior

[dirs]
cert = Y:\\_1\\
serial = 12345678

Additional context

Can be solved by saving "path = filepath.Clean(path)"

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    bug
    on Sep 14, 2023
  2. unknwon commented on Nov 11, 2026

    @unknwon
    Member

    In v2 (unknwon.dev/ini/v2), Write quotes a value that ends in \, so saving and loading again keeps it and the next key. A hand-written line ending in \ still continues onto the next line, as in v1. To read such values literally, load with IgnoreContinuation: true in v1 or IgnoreContinuation(true) in v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions