Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebrowser descends/ascends two levels #20

Open
josch opened this issue Sep 13, 2015 · 0 comments
Open

Filebrowser descends/ascends two levels #20

josch opened this issue Sep 13, 2015 · 0 comments
Labels

Comments

@josch
Copy link
Contributor

josch commented Sep 13, 2015

https://sourceforge.net/p/glui/bugs/26/

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
@josch josch added the bug label Sep 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant