diff options
author | Unknwon <u@gogs.io> | 2016-12-21 23:52:11 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-12-21 23:52:11 -0500 |
commit | 6cc992ea54eb45e4bc8d32df47ef8b17cf4ac84c (patch) | |
tree | 25971d8c503303ed0ede132c10c2d0bd5e8ef5f5 /routers/repo/editor.go | |
parent | 3376354ed8a38c6a3c4f27d6a1111cfa8f739089 (diff) |
Minor fix for PR #3687
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 |