Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosing absolute path on assignation #144

Open
rsemlal opened this issue May 7, 2021 · 1 comment
Open

Loosing absolute path on assignation #144

rsemlal opened this issue May 7, 2021 · 1 comment

Comments

@rsemlal
Copy link

rsemlal commented May 7, 2021

Hello,

When playing with file://uris I found a weird behaviour related to path setter.

Steps to reproduce

>>> x = furl('file:///a/b')
>>> x.path
Path('/a/b')
>>> x.path.isabsolute # The path here is absolute and is ok
True
>>> x.path = x.path / 'c'
>>> x.path  # Once set to the path attribute of a furl object the path is not absolute anymore
Path('a/b/c')
>>> x.path.isabsolute 
False

Additional info & workaround

This problem does not happen whan assigning a path as a string

>>> x = furl('file:///a/b')
>>> x.path = str(x.path / 'c')
>>> x.path 
Path('/a/b/c')
>>> x.path.isabsolute 
True

Expected behaviour

The concatenation of a path segment should not change the way the path interpreted

@gruns
Copy link
Owner

gruns commented May 10, 2021

definitely looks like a bug! great find!

do you have time to dig into this and open a PR to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants