This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Bin Hu
Recipients Bin Hu
Date 2019-07-25.22:08:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564092507.62.0.964588671803.issue37686@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-07-25 22:08:27Bin Husetrecipients: + Bin Hu
2019-07-25 22:08:27Bin Husetmessageid: <1564092507.62.0.964588671803.issue37686@roundup.psfhosted.org>
2019-07-25 22:08:27Bin Hulinkissue37686 messages
2019-07-25 22:08:26Bin Hucreate