[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

Andres Ayala report at bugs.python.org
Fri Jun 1 14:41:45 EDT 2018


Andres Ayala <killerrex at gmail.com> added the comment:

Script to reproduce:

import os
import pathlib

# Change to the Root directory
os.chdir('/')

# Create a relative path object.
p = pathlib.Path('spam')
print(p.resolve())


Expected output:
/span

Incorrect output
//span

----------
Added file: https://bugs.python.org/file47630/plbug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33660>
_______________________________________


More information about the Python-bugs-list mailing list