Fix tabbing over .. in some directories on Windows

This commit is contained in:
Florian Bruhin 2016-11-02 23:18:57 +01:00
parent 0f03960525
commit ebcae3a69c

View File

@ -584,6 +584,9 @@ class FilenamePrompt(_BasePrompt):
path = os.path.normpath(self._file_model.filePath(index))
if clicked:
path += os.sep
else:
# On Windows, when we have C:\foo and tab over .., we get C:\
path = path.rstrip(os.sep)
log.prompt.debug('Inserting path {}'.format(path))
self._lineedit.setText(path)