Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bpy/path.py
| Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | def _ncase_path_found(path): | ||||
| for f_iter in files: | for f_iter in files: | ||||
| if f_iter.lower() == filename_low: | if f_iter.lower() == filename_low: | ||||
| f_iter_nocase = f_iter | f_iter_nocase = f_iter | ||||
| break | break | ||||
| if f_iter_nocase: | if f_iter_nocase: | ||||
| return _os.path.join(dirpath, f_iter_nocase) + suffix, True | return _os.path.join(dirpath, f_iter_nocase) + suffix, True | ||||
| else: | else: | ||||
| # cant find the right one, just return the path as is. | # can't find the right one, just return the path as is. | ||||
| return path, False | return path, False | ||||
| ncase_path, found = _ncase_path_found(path) | ncase_path, found = _ncase_path_found(path) | ||||
| return ncase_path if found else path | return ncase_path if found else path | ||||
| def ensure_ext(filepath, ext, case_sensitive=False): | def ensure_ext(filepath, ext, case_sensitive=False): | ||||
| """ | """ | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||