Show More
@@ -82,6 +82,7 b" def unquote_filename(name, win32=(sys.platform=='win32')):" | |||||
82 | def compress_user(path): |
|
82 | def compress_user(path): | |
83 | """Reverse of :func:`os.path.expanduser` |
|
83 | """Reverse of :func:`os.path.expanduser` | |
84 | """ |
|
84 | """ | |
|
85 | path = py3compat.unicode_to_str(path, sys.getfilesystemencoding()) | |||
85 | home = os.path.expanduser('~') |
|
86 | home = os.path.expanduser('~') | |
86 | if path.startswith(home): |
|
87 | if path.startswith(home): | |
87 | path = "~" + path[len(home):] |
|
88 | path = "~" + path[len(home):] |
General Comments 0
You need to be logged in to leave comments.
Login now