1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

Fixed path bug in repo

This commit is contained in:
xiez
2012-09-13 13:53:26 +08:00
parent 29df42dc64
commit 47f1a025a8

View File

@@ -134,7 +134,10 @@ class RepoMixin(object):
return self.kwargs.get('repo_id', '')
def get_path(self):
return self.request.GET.get('p', '/')
path = self.request.GET.get('p', '/')
if path[-1] != '/':
path = path + '/'
return path
def get_user(self):
return self.request.user
@@ -180,7 +183,8 @@ class RepoMixin(object):
dirs = seafserv_threaded_rpc.list_dir_by_path(self.current_commit.id,
path.encode('utf-8'))
except SearpcError, e:
return render_error(request, e.msg)
raise Http404
# return render_error(self.request, e.msg)
for dirent in dirs:
if stat.S_ISDIR(dirent.props.mode):
dir_list.append(dirent)