Fixed a bug when 'dir' equals ''. Filename's first character was truncated.

bzr revid: olt@tinyerp.com-20090114081041-ft5vynfi58078vj6
This commit is contained in:
Olivier Laurent
2009-01-14 09:10:41 +01:00
parent 892eeea5ae
commit 9acb5b8ca4
+2 -1
View File
@@ -170,7 +170,8 @@ def get_module_filetree(module, dir='.'):
for f in files:
if not f.startswith(dir):
continue
f = f[len(dir)+int(not dir.endswith('/')):]
if dir:
f = f[len(dir)+int(not dir.endswith('/')):]
lst = f.split(os.sep)
current = tree
while len(lst) != 1: