1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-20 20:09:07 +00:00

fixed extra check

This commit is contained in:
mmussomele 2015-05-17 09:52:42 -07:00
parent 8fdcff776a
commit 3c673e0972

View File

@ -40,7 +40,7 @@ def get_new_command(command, settings):
cwd = os.path.split(cwd)[0]
continue
best_matches = get_close_matches(directory, _get_sub_dirs(cwd), cutoff=MAX_ALLOWED_DIFF)
if len(best_matches):
if best_matches:
cwd = os.path.join(cwd, best_matches[0])
else:
return cd_mkdir.get_new_command(command, settings)