User forums > General (but related to Code::Blocks)

[BUG/mingw] Code::Blocks adds quotes only if there are spaces in a path

(1/3) > >>

Dmitri:
For some reason C::B behaves like this. It should add quotes for any paths (output, intermediate dir, source and output files, ...) in any case.

raynebc:
Why should it add quotation marks in a scenario when they are not required for proper functionality?

Dmitri:
They are actually required "for proper functionality". Take this as a simple rule.
What if you have an environment variable in your path, which contains a string with spaces?

oBFusCATed:
We will expand the variable and then we'll decide if we need to add quotes or not, I guess.
This discussion is pointless if you don't show concrete examples where cb produces wrong paths.

And keep in mind that sometimes adding quotes could confuse programs which doesn't expect them, so it is not as easy as always-put-quotes around paths...

Dmitri:
Here's a concrete example for you:
1. Create a folder on your desktop, and put spaces into its name. Example: "fol der".
2. Create a C::B project in this folder.
3. Change output path to $(PROJECT_DIR)\output
4. Try to compile your project with mingw-64 compiler.

And we're not talking about abstract programs, it's Code::Blocks and mingw only.

Navigation

[0] Message Index

[#] Next page

Go to full version