You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/02/02 00:57:16 UTC
svn commit: r1563520 -
/incubator/climate/trunk/ocw-ui/backend/directory_helpers.py
Author: joyce
Date: Sat Feb 1 23:57:16 2014
New Revision: 1563520
URL: http://svn.apache.org/r1563520
Log:
CLIMATE-326 - Simply directory clean regex in directory_helpers
Modified:
incubator/climate/trunk/ocw-ui/backend/directory_helpers.py
Modified: incubator/climate/trunk/ocw-ui/backend/directory_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/directory_helpers.py?rev=1563520&r1=1563519&r2=1563520&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/directory_helpers.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/directory_helpers.py Sat Feb 1 23:57:16 2014
@@ -116,7 +116,7 @@ def getPathLeader():
def _get_clean_directory_path(path_leader, dir_path):
''''''
# Strip out any .. or . relative directories and remove duplicate slashes
- dir_path = re.sub('/\.\./|/\.\.|/\./|/\.', '/', dir_path)
+ dir_path = re.sub('/[\./]*/?', '/', dir_path)
dir_path = re.sub('//+', '/', dir_path)
# Prevents the directory path from being a substring of the path leader.