mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
* Check if file is a symlink with web editor (#3687) * editor checks for symlinks * translate file_is_a_symlink message * credit translation author * fix error constant
This commit is contained in:
committed by
Thomas Boerger
parent
e0ecd9fd93
commit
0e1392501d
@ -186,6 +186,11 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if entry.IsLink() {
|
||||
ctx.Data["Err_TreePath"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.file_is_a_symlink", part), tplEditFile, &form)
|
||||
return
|
||||
}
|
||||
if entry.IsDir() {
|
||||
ctx.Data["Err_TreePath"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.filename_is_a_directory", part), tplEditFile, &form)
|
||||
|
Reference in New Issue
Block a user