Simplify _set_fileview_root
This commit is contained in:
parent
b0a04bff8e
commit
4a360ba185
@ -538,16 +538,9 @@ class FilenamePrompt(_BasePrompt):
|
|||||||
path.rstrip(separators)
|
path.rstrip(separators)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
path = path
|
return
|
||||||
elif os.path.isdir(os.path.basename(path)):
|
|
||||||
path = os.path.basename(path)
|
|
||||||
else:
|
|
||||||
path = None
|
|
||||||
except OSError:
|
except OSError:
|
||||||
path = None
|
|
||||||
|
|
||||||
if path is None:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
root = self._file_model.setRootPath(path)
|
root = self._file_model.setRootPath(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user