Title: pathlib.resolve(strict=False) only includes first child
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mshuffett, pitrou, seirl, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-04-26 16:19 by mshuffett, last changed 2017-05-18 12:25 by Dormouse759.

Pull Requests
URL Status Linked Edit
PR 1649 open Dormouse759, 2017-05-18 12:25
Messages (2)
msg292369 - (view) Author: Michael Shuffett (mshuffett) Date: 2017-04-26 16:19
According to the documentation
If strict is False, the path is resolved as far as possible and any remainder is appended without checking whether it exists.

The current behavior is not consistent with this, and only appends the first remainder.

For example:
If we have an empty '/tmp' directory
Path('/tmp/foo').resolve() and Path('/tmp/foo/bar').resolve() both result in Path('/tmp/foo') but Path('/tmp/foo/bar').resolve() should result in Path('/tmp/foo/bar')
msg292623 - (view) Author: Antoine Pietri (seirl) * Date: 2017-04-30 10:12
I can reproduce this bug. This behavior is really confusing.
Date User Action Args
2017-05-18 12:25:13Dormouse759setpull_requests: + pull_request1744
2017-04-30 10:12:58seirlsetnosy: + seirl
messages: + msg292623
2017-04-26 17:18:12serhiy.storchakasetnosy: + pitrou, serhiy.storchaka
2017-04-26 16:19:45mshuffettcreate