Saveas shouldn't work when saving to a folder and there is some content; bug 558670

This commit is contained in:
Julian Viereck 2010-04-22 20:46:04 +02:00
Родитель 2b3767572a
Коммит 049da57a60
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -273,6 +273,10 @@ def putfile(request, response):
user = request.user
owner, project, path = _split_path(request)
if (path == '' or path.endswith('/')) and request.body:
raise BadRequest("Path ended in '/' indicating directory, but request contains body text")
project = get_project(user, owner, project, create=True)
if path.endswith('/'):