4fb2006ca1
Gitea will attempt to lookup its location using LookPath however, this fails on cmd.exe if gitea is in the current working directory. exec.LookPath will return an exec.ErrDot error which we can test for and then simply using filepath.Abs(os.Args[0]) to absolute gitea against the current working directory. Fix #22063 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> |
||
---|---|---|
.. | ||
attachment.go | ||
cache.go | ||
cors.go | ||
cron.go | ||
cron_test.go | ||
database.go | ||
database_sqlite.go | ||
database_test.go | ||
directory.go | ||
federation.go | ||
git.go | ||
i18n.go | ||
indexer.go | ||
indexer_test.go | ||
lfs.go | ||
log.go | ||
mailer.go | ||
markup.go | ||
migrations.go | ||
mime_type_map.go | ||
mirror.go | ||
oauth2_client.go | ||
packages.go | ||
packages_test.go | ||
picture.go | ||
project.go | ||
proxy.go | ||
queue.go | ||
repository.go | ||
service.go | ||
session.go | ||
setting.go | ||
setting_test.go | ||
storage.go | ||
storage_test.go | ||
task.go | ||
webhook.go |