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

file_dialog interferes with relative paths #451

Open
WASCHMASCHINE opened this issue Jun 17, 2020 · 1 comment
Open

file_dialog interferes with relative paths #451

WASCHMASCHINE opened this issue Jun 17, 2020 · 1 comment

Comments

@WASCHMASCHINE
Copy link

I want to load an image after I have chosen a file with a file_dialog triggered from a button.
That is double-click a file or select and open it.
I use a relative path like "..\MyImages/someImage000.png" for loading the image, but it seems to only work in my program when I have not used file_dialog as described before. It still works with the full hardcoded path, but I was wondering why the file_dialog interferes with that at all.

@WASCHMASCHINE
Copy link
Author

The working directory indeed changes after testing it with getcwd. It changes to the new file, which surprised me. Now, I just save the previous working directory string and switch back to it in the callback with chdir. Keeping this ticket open because I am unsure if this behavior is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant