diff options
Diffstat (limited to 'routers/repo/editor.go')
-rw-r--r-- | routers/repo/editor.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go index c88ca7d6..b1678f68 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -188,8 +188,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo ctx.Data["Err_TreePath"] = true ctx.RenderWithErr(ctx.Tr("repo.editor.file_is_a_symlink", part), EDIT_FILE, &form) return - } - if entry.IsDir() { + } else if entry.IsDir() { ctx.Data["Err_TreePath"] = true ctx.RenderWithErr(ctx.Tr("repo.editor.filename_is_a_directory", part), EDIT_FILE, &form) return |