1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

Fix filename bug

This commit is contained in:
xiez
2012-07-13 11:31:03 +08:00
parent 6086eefd2c
commit 2a7966223f

View File

@@ -1,4 +1,5 @@
# encoding: utf-8
import os
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404
@@ -137,7 +138,7 @@ def share_admin(request):
# File shared links
fileshares = FileShare.objects.filter(username=request.user.username)
for fs in fileshares:
fs.filename = fs.path[1:]
fs.filename = os.path.basename(fs.path)
fs.repo = get_repo(fs.repo_id)
return render_to_response('repo/share_admin.html', {