mirror of https://github.com/kivy/kivy.git
Update filechooser.py
Modification of function _generate_file_entries (lines 821-831) so as to correct a malfunctioning with ..\ in Windows platforms (it was impossible to go back after having accessed a directory)
This commit is contained in:
parent
bcd8887106
commit
9e01c953bc
|
@ -818,7 +818,15 @@ class FileChooserController(RelativeLayout):
|
|||
# generate an entries to go back to previous
|
||||
if not is_root and not have_parent:
|
||||
back = '..' + sep
|
||||
pardir = self._create_entry_widget(dict(
|
||||
if platform == 'win':
|
||||
new_path = path[:path.rfind(sep)]
|
||||
if sep not in new_path:
|
||||
new_path+= sep
|
||||
pardir = self._create_entry_widget(dict(
|
||||
name=back, size='', path=new_path, controller=ref(self),
|
||||
isdir=True, parent=None, sep=sep, get_nice_size=lambda: ''))
|
||||
else:
|
||||
pardir = self._create_entry_widget(dict(
|
||||
name=back, size='', path=back, controller=ref(self),
|
||||
isdir=True, parent=None, sep=sep, get_nice_size=lambda: ''))
|
||||
yield 0, 1, pardir
|
||||
|
|
Loading…
Reference in New Issue