[New-bugs-announce] [issue37686] No error message in joining two root directories
Bin Hu
report at bugs.python.org
Thu Jul 25 18:08:27 EDT 2019
New submission from Bin Hu <hubin.lanl at gmail.com>:
Two root directories shall not be joined in the first place. But, when such a command is passed, os.path.join() module should give a warning message instead of just keeping the second argument being passed as the output.
Python 3.7.3 (default, Mar 27 2019, 16:54:48)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from os import path
In [2]: a = '/tmp'
In [3]: b = '/data'
In [4]: print(path.join(a, b))
/data
In [5]: b = 'data'
In [6]: print(path.join(a, b))
/tmp/data
----------
components: Extension Modules
messages: 348457
nosy: Bin Hu
priority: normal
severity: normal
status: open
title: No error message in joining two root directories
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37686>
_______________________________________
More information about the New-bugs-announce
mailing list