[issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/'
Jesús Cea Avión j...@jcea.es added the comment: See issue #14768. -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/'
Georg Brandl ge...@python.org added the comment: Thanks, committed in r71241. -- nosy: +georg.brandl resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/'
New submission from pancake panc...@nopcode.org: When the HOME path is just '/' python says that the home path is (zero length string) I was able to reproduce this issue in 2.5.2 and 2.6 (no idea about 3.0) Here's an example: $ HOME=/ python -c 'import os;print os.path.expanduser(~)' $ HOME=/tmp python -c 'import os;print os.path.expanduser(~)' /tmp $ HOME=a python -c 'import os;print os.path.expanduser(~)' a --8-- I just used if !os.path.isdir(os.path.expanduser('~')): check in my application to avoid messing around the resulting paths when the application runs. The correct response should be '/' instead of ''. -- components: None message_count: 1.0 messages: 83445 nosy: pancake nosy_count: 1.0 severity: normal status: open title: os.path.expanduser('~') doesnt works correctly when HOME is '/' type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/'
Guilherme Polo ggp...@gmail.com added the comment: Patch with a test attached. -- keywords: +patch message_count: 1.0 - 2.0 nosy: +gpolo nosy_count: 1.0 - 2.0 versions: +Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13297/issue_5471.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com