#26 Filebrowser descends/ascends two levels

open
nobody
5
2012-07-18
2008-02-04
Anonymous
No

The function void GLUI_FileBrowser::dir_list_callback(GLUI_Control *glui_object)
in glui_filebrowser.cpp

does 2 directory changes when gnuc compiler used in windows. Easily seen if you double click on the .. in the browser and it takes you up not to the parent directory but rather the "grand"parent directory.

The problem lines are

ifdef GNUC

    chdir(selected+1);

endif

ifdef _WIN32

    SetCurrentDirectory(selected+1);

endif

because both GNUC and WIN32 are true when using my gnuc compiler in windows ie dev-cpp.

The logical fix seems to be to change to an #elif as follows

ifdef GNUC

    chdir(selected+1);

elif _WIN32

    SetCurrentDirectory(selected+1);

endif

Discussion


Anonymous


Cancel   Add attachments