From 9acb5b8ca4a06360610026f016b47e510ccc83f9 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Wed, 14 Jan 2009 09:10:41 +0100 Subject: [PATCH] Fixed a bug when 'dir' equals ''. Filename's first character was truncated. bzr revid: olt@tinyerp.com-20090114081041-ft5vynfi58078vj6 --- bin/addons/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index bf0dc39e279..980125a41e6 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -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: