Fix #3320 (Long Folder Names on Kindle)

This commit is contained in:
Kovid Goyal 2009-09-04 10:15:37 -06:00
parent a3bded09d1
commit bfb4199452

View File

@ -63,6 +63,8 @@ def shorten_components_to(length, components):
if not r: if not r:
r = x.strip()[0] if x.strip() else 'x' r = x.strip()[0] if x.strip() else 'x'
ans.append(r) ans.append(r)
if len(os.sep.join(ans)) > length:
return shorten_components_to(length, ans)
return ans return ans
def find_executable_in_path(name, path=None): def find_executable_in_path(name, path=None):