it's not fully correct function
Alexey-T opened this issue · comments
def collapse_path(path):
if path.startswith(USER_DIR):
path = path.replace(USER_DIR, '~', 1)
return path
for name like /home/user2/test' it gives
~2/test`
:)
need
if (path+'/').startswith(USER_DIR+'/'):
Dont leave Windows behind :)
(path + os.sep).startswith(USER_DIR + os.sep)
fixed