Author Topic: %USERPROFILE% bug  (Read 14787 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
%USERPROFILE% bug
« on: August 04, 2005, 04:37:18 pm »
Guys, i pinpointed a configuration bug and I've managed to replicate it. But it seems the error lies inside the wxConfigBase class, and not in codeblocks itself... (i think). Actually I'm not sure...
this is why I need your help.

In windows, open a command prompt.

type the folowing:

SET OLDHOME=%HOME%
SET OLDUSERPROFILE=%USERPROFILE%
SET USERPROFILE=
SET HOME=%USERPROFILE%
SET USERPROFILE=%OLDUSERPROFILE%
(your app path)\Codeblocks.exe

Open, and close. You'll see an error saying a directory couldn't be created. The problem is, WHERE in the code is this error triggered?

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: %USERPROFILE% bug
« Reply #1 on: August 04, 2005, 04:46:31 pm »
Hi rick !

i tried CB_CVS_HEAD with your batchfile and doesn't get an error  :?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: %USERPROFILE% bug
« Reply #2 on: August 04, 2005, 05:47:07 pm »
Try it with VERSION_1_0 branch, with wx2.4.2. Oh, the commands must be typed DIRECTLY, not within a batch file!

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: %USERPROFILE% bug
« Reply #3 on: August 04, 2005, 05:53:34 pm »
i tried it also with VERSION_1_0 built with wx242, but also no error message

can you please explain me the difference between typing the commands directly and running from a batchfile ?
i don't understand how this can make a difference.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: %USERPROFILE% bug
« Reply #4 on: August 04, 2005, 08:52:19 pm »
In batch files i think you need to use double %'s.

Anyway my goal is to set the HOME variable to have %PROFILE% (with the % signs) as its value, and this is only possible if the PROFILE variable is not set.

Under these particular conditions, codeblocks (on exit) shows the weird error

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: %USERPROFILE% bug
« Reply #5 on: August 04, 2005, 09:04:19 pm »
... my goal is to set the HOME variable to have %PROFILE% (with the % signs) as its value, and this is only possible if the PROFILE variable is not set.
Under these particular conditions, codeblocks (on exit) shows the weird error

Ahh OK ... now i could produce the error too ! with CB_HEAD