Catch OSErrors in fix_path_case

This commit is contained in:
Mathieu Comandon 2016-10-31 13:24:47 -07:00
parent 0361c9fcc2
commit af235eb377

View file

@ -223,7 +223,12 @@ def fix_path_case(path):
if os.path.exists(tested_path):
current_path = tested_path
continue
for filename in os.listdir(current_path):
try:
path_contents = os.listdir(current_path)
except OSError:
logger.error("Can't read contents of %s", current_path)
path_contents = []
for filename in path_contents:
if filename.lower() == part.lower():
current_path = os.path.join(current_path, filename)
continue