# HG changeset patch # User paulb # Date 1121545958 0 # Node ID 5b276bbcbbb52c67b0814f84125d83b8da1cf2dd # Parent 257d97a1b3ca7b37e4820b435af40f9d17cca74a [project @ 2005-07-16 20:32:38 by paulb] Changed virtual path info in sub-resources so that it may be an empty string. diff -r 257d97a1b3ca -r 5b276bbcbbb5 WebStack/Resources/ResourceMap.py --- a/WebStack/Resources/ResourceMap.py Sat Jul 16 20:32:12 2005 +0000 +++ b/WebStack/Resources/ResourceMap.py Sat Jul 16 20:32:38 2005 +0000 @@ -40,7 +40,8 @@ # path info consists of a "/" character plus some other text), the first # part should always be empty and there should always be a second part. # Where the published resource has no path info defined, there will only - # be one part. In the latter case, we define the name to be None. + # be one part. In the latter case, we define the name to be None, + # although the name will not be relevant if directory_redirects is set. if len(parts) > 1: name = parts[1] @@ -58,9 +59,9 @@ # If a resource was found, change the transaction's path info. # eg. "/this/next" -> "/next" # eg. "/this/" -> "/" - # eg. "/this" -> "/" + # eg. "/this" -> "" - new_path = parts[0:1] + (parts[2:] or [""]) + new_path = parts[0:1] + parts[2:] new_path_info = "/".join(new_path) trans.set_virtual_path_info(new_path_info)