User forums > Using Code::Blocks
Slash symbol in custom variable
Dvorkin:
I've defined custom variable
REMOTE_DIR=/mnt/app/bin
at Project Build Options->Custom Variables.
But after I closed the project and opened it again, the variable is:
REMOTE_DIR=\mnt\app\bin
So slash become backward slash. Why is it?
I work in Windows 7, Code::Blocks v13.12
Dvorkin:
There is correct record in .cbp project file.
<Environment>
<Variable name="REMOTE_DIR" value="/mnt/app/bin" />
So the problem is in project file reading (while the project opening).
I need in the variable REMOTE_DIR to specify directory at remote system running on Linux.
oBFusCATed:
C::B does an automatic conversion of paths, so they look native on the different operating systems.
Probably we should add an option to disable this feature for some of the variables.
Dvorkin:
I think you should not do any conversions at all. The variable's value is just text string, and only user must decide is it a path or something else...
oBFusCATed:
Most of the times the ENV vars are used to setup paths and automatic conversion generally is a good thing. But probably we need some switch to allow the user to override it.
Navigation
[0] Message Index
[#] Next page
Go to full version