Am 18.01.2011 um 07:03 schrieb Vincent van Ravesteijn:

> Because if the variable is not a variable, it might just be a filename 
> containing a $.

But the function replaceEnvironmentPath() don't know if the $ is in the filename
or is a environment variable.

If the filename e. g. contains $TEMP this would happily be replaced. And I can
call it a bug too, since the syntax for environment variables on windows is 
%TEMP%.
Another story I have to tell: if you are using a $ in filename and save this
file in an unix based source code system you are in trouble too.
There are some things better to avoid.

But ok, one always should try harder... I said it already: if the real filename
contains a $ and we want to support that we should do it right. Then the call
to replaceEnvironmentPath() is wrong or it should be possible to escape the $ 
somehow.

Stephan

PS
A dirty workaround may be to use the ${VARNAME} variant only to expand 
variables and
stop supporting the alternative "short" form $VARNAME. But that's another dirty 
hack.


>> Op 17 jan 2011 16:07 schreef "Stephan Witt" <st.w...@gmx.net>:
>> 
>> Am 16.01.2011 um 16:12 schrieb Pavel Sanda:
>> 
>> > Stephan Witt wrote:
>> >> Am 16.01.2011 um 14:25 schrieb Peter Kümmel:
>> >>
>> 
>> >>> The patch complete removes the regex logic in replaceEnvironmentPath 
>> >>> because
>> >>> it seems to be ...
>> 
>> Vincent,
>> 
>> svn blame points to you...
>> What's your opinion regarding the change in behavior with
>> undefined variables? Why do you pass the undefined variable
>> verbatim?
>> 
>> Stephan
>> 
>> > 
>> >> Index: src/support/filetools.cpp
>> >> ================================================...
>> 
> 

Reply via email to