Code Monkey home page Code Monkey logo

Comments (4)

Rookfighter avatar Rookfighter commented on May 26, 2024

its the # symbol in line 4. # starts a comment so everything after that # is interpreted as comment, so the closing bracket of the section ] is interpreted as comment. Use \# to escape the hash symbol. I will verify this solution as soon as possible.

from inifile-cpp.

cathaysia avatar cathaysia commented on May 26, 2024

Sorry, I don't know why the answer not be uploaded last time. I edit this again.

I had try your way, it works when I write it at first, but when I write ini again, \# be recovered automated :(

When I first write file:

[/home/xxx/.gnupg/]
Acls=user::rwx;group::---;other::---

[/home/xxx/.gnupg/.\#lk0x00005648c0e23490.fedora.29271]
Acls=user::rw-;group::r--;other::r--

write this file again:

[/home/xxx/.gnupg/]
Acls=user::rwx;group::---;other::---
[/home/xxx/.gnupg/.#lk0x00005648c0e23490.fedora.29271]
Acls=user::rw-;group::r--;other::r--
[/home/xxx/.gnupg/openpgp-revocs.d/D7394F3CF66F676B6030C77F7EA203FF0732DAFB.rev]
Acls=user::rw-;group::---;other::---
[/home/xxx/.gnupg/private-keys-v1.d/3F2387B5A27C2F624CB7379D875F6F8758B1EA7B.key]
Acls=user::rw-;group::---;other::---

I promise not replace \# with "#"

from inifile-cpp.

Rookfighter avatar Rookfighter commented on May 26, 2024

Thanks, looks like a bug, where the comment character is not properly escaped, when the file is written. I will look into fixing this !

from inifile-cpp.

Rookfighter avatar Rookfighter commented on May 26, 2024

Hi @cathaysia

The bug should be fixed with the most recent head of master. Sorry for the delay and thanks for waiting.
The basic issue was that comment characters were not escaped correctly when writing the inifile.
inifile-cpp should now provide consistent loading and saving, meaning that it should be able to parse anything that it has written itself.

from inifile-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.