mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-13 06:20:24 +00:00
This PR fixes a bug where the previously-implemented functionality to delete the `.gitea/template` or `.forgejo/template` file when generating a repository from a template was not working. The issue happened because the code was using `util.Remove()` with a relative path, but this resolves against the process working directory instead of the temporary clone directory. The fix was to use `root.Remove()` which is based on an `os.OpenRoot()` anchored at `tmpDir`. Updated integration tests and verified that they pass with this change and fail without it. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11691 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Brandon Rothweiler <bdr9@noreply.codeberg.org> Co-committed-by: Brandon Rothweiler <bdr9@noreply.codeberg.org> |
||
|---|---|---|
| .. | ||
| e2e | ||
| fuzz | ||
| gitea-lfs-meta | ||
| gitea-repositories-meta | ||
| integration | ||
| testdata/data | ||
| mysql.ini.tmpl | ||
| pgsql.ini.tmpl | ||
| sqlite.ini.tmpl | ||
| test_utils.go | ||