|
|
@@ -839,9 +839,9 @@ func renameFilePost(ctx *context.Context, form auth.RenameRepoFileForm) { |
|
|
|
}); err != nil { |
|
|
|
// This is where we handle all the errors thrown by repofiles.CreateOrUpdateRepoFile |
|
|
|
if git.IsErrNotExist(err) { |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(ctx.Tr("repo.editor.file_editing_no_longer_exists", ctx.Repo.TreePath))) |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(ctx.Tr("repo.editor.file_or_directory_editing_no_longer_exists", ctx.Repo.TreePath))) |
|
|
|
} else if models.IsErrLFSFileLocked(err) { |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(ctx.Tr("repo.editor.file_editing_no_longer_exists", ctx.Tr("repo.editor.upload_file_is_locked", err.(models.ErrLFSFileLocked).Path, err.(models.ErrLFSFileLocked).UserName)))) |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(ctx.Tr("repo.editor.file_or_directory_editing_no_longer_exists", ctx.Tr("repo.editor.upload_file_is_locked", err.(models.ErrLFSFileLocked).Path, err.(models.ErrLFSFileLocked).UserName)))) |
|
|
|
} else if models.IsErrFilenameInvalid(err) { |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(ctx.Tr("repo.editor.filename_is_invalid", form.TreePath))) |
|
|
|
} else if models.IsErrFilePathInvalid(err) { |
|
|
|