Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

[BUG]: "Directory cannot be created" error if directory is present

(1/2) > >>

MortenMacFly:
- Create a C project (using the wizard) having the two targets "debug" and "release" enabled
- Close the project
- Create another C project with the very same name, say "yes" to all warnings about "you are
overwriting stuff"...

C::B errors with "The directory cannot be created" - which is true, because the directory already exists.

With regards, Morten.

MortenMacFly:
Ok - it errors in wiz.cpp (scripted wizard plugin) at line 327:

--- Code: ---if (!CreateDirRecursively(prjdir))
--- End code ---
...continuing search...

Edit: The issue here: CreateDirRecursively gets a directory with a trailing path separator and cannot handle this - "Early out" will not work in that case.

Thomas - I knew it... *g*

thomas:
Except "early out" is entirely innocent :)

MortenMacFly:
Ah - I see...
3206 - [thomasdenk] - 3 days:
- Corrected return value on "already exists" in CreateDirRecursively() to be consistent with "successfully created".
:-(
That easy??? Dammed!!!

Edit: Wait a second... that's correct! - No you got me confused entirely...?!

MortenMacFly:
I don't get it: Why is early out innocent? The path exists, so wxDirExists should be true, thus: early out. CreateDirRecursively() should return "true" in that case which wouldn't cause the error message of wiz.cpp...?!
Mind enlighten me what I am missing here??? :shock:

Navigation

[0] Message Index

[#] Next page

Go to full version