Re: [Boost-bugs] [Boost C++ Libraries] #850: program_options strips off escaped quotes in some situations

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #850: program_options strips off escaped quotes in some situations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-29 09:00:26


#850: program_options strips off escaped quotes in some situations
---------------------------+------------------------------------------------
  Reporter: apoxy | Owner: vladimir_prus
      Type: Bugs | Status: reopened
 Milestone: Boost 1.42.0 | Component: program_options
   Version: None | Severity: Problem
Resolution: | Keywords:
---------------------------+------------------------------------------------
Changes (by thomas.jarosch@…):

  * status: closed => reopened
  * resolution: fixed =>

Comment:

 Hello,

 I just updated from boost version 1.39.0 to boost 1.44.0 (on linux)
 and this change broke the config file parsers.

 Imagine a simple config file like this:

 WorkDir= "/some/where"

 The new code keeps the quotes on the directory name string
 and so the open() call for the directory fails.

 So I could change my code to manually strip the quotes
 or remove the quotes in the config file (which get generated
 automatically).

 Though there's one case where this won't work as good as before.
 Imagine a config line like this:

 WorkDir = "/some/where "

 This can't be express with the changed code as:
 WorkDir = /some/where

 -> It will strip all the spaces, so you can't have
 config file values ending on spaces anymore.

 So the code was broken for the CLI parser but needed
 for the config file parser (as suspected above...).

 Any chance we can restore the behavior
 for the config file parser only?

 Cheers,
 Thomas

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/850#comment:9>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC