flying-circus / pyfilesystem

Automatically exported from code.google.com/p/pyfilesystem
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pathcombine() is incorrect if path1 is empty #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  path_combine('', 'foo.txt')

What is the expected output? What do you see instead?
Should just be 'foo.txt', but is "/foo.txt" making an incorrect absolute path

What version of the product are you using? On what operating system?
Latest source, as of 6/6/13, on OS X 10.8 and Win7

Please provide any additional information below.
I patched this by adding:

    if path1 == '':
        return path2.lstrip('/')

Original issue reported on code.google.com by ben.trom...@gmail.com on 10 Jun 2013 at 11:34

GoogleCodeExporter commented 9 years ago

Original comment by willmcgugan on 10 Sep 2013 at 9:08