bug 9811; Relative media path incorrectly calculated for Windows
This commit is contained in:
		| @@ -137,8 +137,12 @@ def relative_path(original, base): | |||||||
|     base_list = [_f for _f in base_list if _f] |     base_list = [_f for _f in base_list if _f] | ||||||
|     target_list = [_f for _f in target_list if _f] |     target_list = [_f for _f in target_list if _f] | ||||||
|     i = -1 |     i = -1 | ||||||
|  |     # base path is normcase (lower case on Windows) so compare target in lower | ||||||
|  |     # on Windows as well | ||||||
|     for i in range(min(len(base_list), len(target_list))): |     for i in range(min(len(base_list), len(target_list))): | ||||||
|         if base_list[i] != target_list[i]: break |         if base_list[i] != (target_list[i].lower() if win() | ||||||
|  |                             else target_list[i]): | ||||||
|  |             break | ||||||
|     else: |     else: | ||||||
|         #if break did not happen we are here at end, and add 1. |         #if break did not happen we are here at end, and add 1. | ||||||
|         i += 1 |         i += 1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user