Message401996
Reproduction Steps:
-------------------
Create a symlink in a directory without permissions:
>>> from pathlib import Path
>>>
>>> target = Path('/tmp/tmp/target')
>>> src = Path('/tmp/tmp/src')
>>> src.symlink_to(target)
Actual:
-------
Permission error shows reversed order:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/pathlib.py", line 1382, in symlink_to
if self._closed:
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/pathlib.py", line 445, in symlink
def symlink(a, b, target_is_directory):
PermissionError: [Errno 13] Permission denied: '/tmp/tmp/target' -> '/tmp/tmp/src'
Expected:
---------
Same as os.symlink the permission error should show the right symlink order:
>>> import os
>>>
>>> os.symlink(str(src), str(target))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
PermissionError: [Errno 13] Permission denied: '/tmp/tmp/src' -> '/tmp/tmp/target' |
|
Date |
User |
Action |
Args |
2021-09-17 01:06:02 | dfntlymaybe | set | recipients:
+ dfntlymaybe |
2021-09-17 01:06:02 | dfntlymaybe | set | messageid: <1631840762.01.0.206152391874.issue45226@roundup.psfhosted.org> |
2021-09-17 01:06:01 | dfntlymaybe | link | issue45226 messages |
2021-09-17 01:06:01 | dfntlymaybe | create | |
|