Message348457
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 |
|
Date |
User |
Action |
Args |
2019-07-25 22:08:27 | Bin Hu | set | recipients:
+ Bin Hu |
2019-07-25 22:08:27 | Bin Hu | set | messageid: <1564092507.62.0.964588671803.issue37686@roundup.psfhosted.org> |
2019-07-25 22:08:27 | Bin Hu | link | issue37686 messages |
2019-07-25 22:08:26 | Bin Hu | create | |
|