[New-bugs-announce] [issue18389] os.path.relpath gives incorrect results if start parameters is not a directory

Jonathan Eldridge report at bugs.python.org
Sat Jul 6 22:14:32 CEST 2013


New submission from Jonathan Eldridge:

With the following directory structure:

    computer$ ls
    foo/
    computer$ ls foo/
    bar/  foo_file.txt
    computer$ ls foo/bar/
    bar_file.txt

Running:

    os.path.relpath('foo/bar/bar_file.txt', 'foo/foo_file.txt')

Returns:

    '../bar/bar_file.txt'

But should return:

    'bar/bar_file.txt'

----------
components: Library (Lib)
messages: 192484
nosy: jveldridge
priority: normal
severity: normal
status: open
title: os.path.relpath gives incorrect results if start parameters is not a directory
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18389>
_______________________________________


More information about the New-bugs-announce mailing list