Saveas shouldn't work when saving to a folder and there is some content; bug 558670
This commit is contained in:
Родитель
2b3767572a
Коммит
049da57a60
|
@ -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('/'):
|
||||
|
|
Загрузка…
Ссылка в новой задаче