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

filechooser: Fix a crash when using a file as the path #5010

Merged
merged 1 commit into from Feb 22, 2017
Merged

filechooser: Fix a crash when using a file as the path #5010

merged 1 commit into from Feb 22, 2017

Conversation

ZingBallyhoo
Copy link
Contributor

Currently, if you select a file (not a folder) in filechooser, and then open a new filechooser using the same path, you will get a crash, because it expects a folder. Most noticeable when using kivy.uix.settings.SettingPath, as you can select a file, and the next time you try and change that setting, the filechooser will be completely blank.

This is just a simple fix that:

  • Checks to see if the path is a file
  • If it is, it will load the parent directory, instead of trying to use the file like a folder

@matham matham merged commit 35fbac9 into kivy:master Feb 22, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants