]> source.dussan.org Git - gitea.git/commit
Handle and propagate errors when checking if paths are Dirs, Files or Exist (#13186)
authorzeripath <art27@cantab.net>
Sat, 28 Nov 2020 02:42:08 +0000 (02:42 +0000)
committerGitHub <noreply@github.com>
Sat, 28 Nov 2020 02:42:08 +0000 (21:42 -0500)
commit742e21aeba5c02935269a2a3681f4486019ce542
treee1572ab13c33dec1238321170a90d42851ae4ca2
parent5b75f17043bc2a6d0e753ae5c9c6759adad5aaac
Handle and propagate errors when checking if paths are Dirs, Files or Exist (#13186)

* Ensure errors from IsDir propagate

* Handle errors when checking IsFile

* Handle and propagate errors from IsExist

* Update modules/templates/static.go

* Update modules/templates/static.go

* Return after ctx.ServerError

* Apply suggestions from code review

* Fix tests

The previous merge managed to break repo_form.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
29 files changed:
cmd/dump.go
cmd/web.go
contrib/environment-to-ini/environment-to-ini.go
integrations/api_repo_test.go
models/repo.go
models/ssh_key.go
models/upload.go
models/wiki.go
modules/auth/repo_form.go
modules/git/hook.go
modules/options/dynamic.go
modules/options/static.go
modules/repository/adopt.go
modules/repository/check.go
modules/repository/create.go
modules/repository/generate.go
modules/repository/hooks.go
modules/repository/init.go
modules/setting/lfs.go
modules/setting/setting.go
modules/ssh/ssh.go
modules/templates/dynamic.go
modules/templates/static.go
modules/util/path.go
routers/admin/repos.go
routers/api/v1/admin/adopt.go
routers/install.go
routers/user/setting/adopt.go
services/archiver/archiver.go