Icon View Filechooser - No possibility to go a directory up
The filechooser Icon View misses a icon for going directories upwards. took a picture of a folder that is not my root folder,

I found out that it's only occuring when you set a root Dir. If you enter e subdir of that root you cannot go back
ok i have a workaround for me, but someone who is better should implement a clean and nice solution:
Problem i that the case if you have set a rootpath is not catched in current version, i wrote about that on irc.
now what i did, i used an extra variable to determine if rootpath was set by the user and added that to the if check. all lines i inserter are marked with ###von mir eingenfuegt
def _generate_file_entries(self, _args, *_kwargs):
# Generator that will create all the files entries.
# the generator is used via _update_files() and _create_files_entries()
# don't use it directly.
is_root = True
path = kwargs.get('path', self.path)
have_parent = kwargs.get('parent', None) is not None
# Add the components that are always needed
if self.rootpath:
rootpath = realpath(self.rootpath)
path = realpath(path)
rootpath_set = True ###von mir eingefuegt
if not path.startswith(rootpath):
self.path = rootpath
return
elif path == rootpath:
is_root = True
else:
rootpath_set = False ###von mir eingefuegt
if platform == 'win':
is_root = splitdrive(path)[1] in (sep, altsep)
elif platform in ('macosx', 'linux', 'android', 'ios'):
is_root = normpath(expanduser(path)) == sep
else:
# Unknown fs, just always add the .. entry but also log
Logger.warning('Filechooser: Unsupported OS: %r' % platform)
is_root = False
# generate an entries to go back to previous
if not is_root and not have_parent:
back = '..' + sep
pardir = Builder.template(self._ENTRY_TEMPLATE, **dict(
name=back, size='', path=back, controller=ref(self),
isdir=True, parent=None, sep=sep, get_nice_size=lambda: ''))
yield 0, 1, pardir
elif is_root and not have_parent and rootpath_set == True : ### von mir eingefuegt
back = '..' + sep ###von mir eingefuegt
pardir = Builder.template(self._ENTRY_TEMPLATE, **dict( ###von mir eingefuegt
name=back, size='', path=back, controller=ref(self), ###von mir eingefuegt
isdir=True, parent=None, sep=sep, get_nice_size=lambda: '')) ###on mir eingefuegt
yield 0, 1, pardir ###von mir eingefuegt
now the "../" appear when the root path is set. But they appear also in the set root dir, so someone better must change to code so it gets hidden there or not created. cheers
It happens when you set a root directory. This is not a bug, it is a feature. http://kivy.org/docs/api-kivy.uix.filechooser.html#kivy.uix.filechooser.FileChooserController
Use "path" instead.
You we're right it is a bug. If you set rootpath and open a subdirectory, you cannot get back to the parent.
Fixed by the PR #1476. :)