Comments (4)
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.
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.
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.
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)
- Changeable field separator
- Add static default IniFile members
- Ignore non-significant spaces HOT 2
- Disallow section duplication HOT 1
- Why not HOT 1
- Changeable comment char
- Add semicolon ";" to comment prefixes
- is:open label:enhancement I want HOT 3
- Comments and line separators getting deleted while saving HOT 5
- Add uint and float field
- Disable program crash if invalid input HOT 5
- Disable sorting HOT 7
- By not existing keys returns 0 HOT 4
- Add dependency install script
- Update to newer Catch version
- Add appveyor CI
- Check existence of field and section
- Allow empty section
- Make header only
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inifile-cpp.