Show More
@@ -47,10 +47,10 b' def _elide_point(string:str, *, min_elide=30)->str:' | |||||
47 | if file_parts[-1] == '': |
|
47 | if file_parts[-1] == '': | |
48 | file_parts.pop() |
|
48 | file_parts.pop() | |
49 |
|
49 | |||
50 | if len(object_parts) > 3: |
|
50 | if len(object_parts) > 3 and object_parts[1] and object_parts[-2]: | |
51 | return '{}.{}\N{HORIZONTAL ELLIPSIS}{}.{}'.format(object_parts[0], object_parts[1][0], object_parts[-2][-1], object_parts[-1]) |
|
51 | return '{}.{}\N{HORIZONTAL ELLIPSIS}{}.{}'.format(object_parts[0], object_parts[1][0], object_parts[-2][-1], object_parts[-1]) | |
52 |
|
52 | |||
53 | elif len(file_parts) > 3: |
|
53 | elif len(file_parts) > 3 and file_parts[1] and file_parts[-2]: | |
54 | return ('{}' + os.sep + '{}\N{HORIZONTAL ELLIPSIS}{}' + os.sep + '{}').format(file_parts[0], file_parts[1][0], file_parts[-2][-1], file_parts[-1]) |
|
54 | return ('{}' + os.sep + '{}\N{HORIZONTAL ELLIPSIS}{}' + os.sep + '{}').format(file_parts[0], file_parts[1][0], file_parts[-2][-1], file_parts[-1]) | |
55 |
|
55 | |||
56 | return string |
|
56 | return string |
General Comments 0
You need to be logged in to leave comments.
Login now