From aa4ab36618c2a00730c8a6e4d8528a2bfe9a85ca Mon Sep 17 00:00:00 2001 From: viega Date: Fri, 5 Jun 1998 06:18:32 +0000 Subject: Fixed a bug where sometimes a leading / is missing from PATH_INFO. --- modules/mm_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/mm_utils.py b/modules/mm_utils.py index cd04ff1f6..e76ac1920 100644 --- a/modules/mm_utils.py +++ b/modules/mm_utils.py @@ -229,7 +229,9 @@ def GetNestingLevel(): if nesting_level == None: try: path = os.environ['PATH_INFO'] - nesting_level = len(string.split(os.environ['PATH_INFO'], '/')) - 1 + if path[0] <> '/': + path= '/' + path + nesting_level = len(string.split(path, '/')) - 1 except KeyError: nesting_level = 0 return nesting_level -- cgit v1.3.1