FileLocator.relative_filename() could mangle the path too much in some unlikely cases

Issue #194 resolved
Marius Gedminas created an issue

If your working directory is /src/myproject and you happen to have your source files in /src/myproject/branchname/src/myproject/, FileLocator().relative_filename() will strip both '/src/myproject/' substrings from the path, leaving just ''.

I'm attaching a test case and a fix.

Comments (2)

  1. Log in to comment