Open
Description
Not sure if this is specifically realted to UNC paths or not, but here is what I'm observing.
Clone a repo from a networked server to your local machine. Then:
>>> from Pathlib import Path
>>> path_str = local_repo.remote('origin').url
>>> print(path_str)
'\\\\\\\\network\\\\path\\\\to\\\\remote\\\\repo'
>>> Path(path_str).exists()
False
>>> Path(path_str).resolve()
WindowsPath('C:/network/path/to/remote/repo')
whereas:
>>> from pathlib import Path
>>> path_str = next(local_repo.remote('origin').urls)
>>> print(path_str)
'\\\\network\\path\\to\\remote\\repo'
>>> Path(path_str).exists()
True
>>> Path(path_str).resolve()
WindowsPath('//network/path/to/remote/repo')
Thanks!