Skip to content

Global code search "View File" link broken #15438

Closed
@D-04

Description

@D-04
  • Gitea version (or commit ref): 1.14.0
  • Git version:
  • Operating system: 1.14 docker image (a491dc1f1e69) on linux amd64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No since REPO_INDEXER_ENABLED seems to be disabled
  • Log gist:

Description

When using Code Search the "View File" link adds the orga/repo path after the already existing one ending up with a broken 404 link like: https://foo.bar/orga/repo/orga/repo/src/commit/<hash>/README.md instead of https://foo.bar/orga/repo/src/commit/<hash>/README.md.

Steps to Reproduce

  1. Create a new Gitea Instance (I used Docker) and set REPO_INDEXER_ENABLED=true in the app.ini file.
  2. Create an Organisation and a repository
  3. Commit a file to the repository
  4. Search for some content in the file and press "View File"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions