Simplify _set_fileview_root

This commit is contained in:
Florian Bruhin 2016-10-28 07:17:57 +02:00
parent b0a04bff8e
commit 4a360ba185

View File

@ -538,16 +538,9 @@ class FilenamePrompt(_BasePrompt):
path.rstrip(separators)
try:
if os.path.isdir(path):
path = path
elif os.path.isdir(os.path.basename(path)):
path = os.path.basename(path)
else:
path = None
if not os.path.isdir(path):
return
except OSError:
path = None
if path is None:
return
root = self._file_model.setRootPath(path)