fixed issue #980, Admin application: can't access directories with space in directory name, thanks mmihaltz
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{{extend 'layout.html'}}
|
||||
{{
|
||||
import re
|
||||
regex_space = re.compile('\s+')
|
||||
def all(items):
|
||||
return reduce(lambda a,b:a and b,items,True)
|
||||
def peekfile(path,file,vars={},title=None):
|
||||
@@ -304,7 +306,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
||||
while path!=file_path:
|
||||
if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]):
|
||||
path.append(file_path[len(path)])
|
||||
thispath='static__'+'__'.join(path)
|
||||
thispath = regex_space.sub('-', 'static__'+'__'.join(path))
|
||||
}}
|
||||
<li class="folder"><i> </i>
|
||||
<a href="javascript:collapse('{{=thispath}}');" class="file">{{=path[-1]}}/</a>
|
||||
|
||||
Reference in New Issue
Block a user