Gitea "View File" issue

Gitea 1.12.4

When reviewing code and clicking on “View File”, sometimes the view will fail and produce a 404 error. At first I thought this was an Nginx proxy issue, but in fact what I’m seeing is that for some of the files listed on the screen fail in View File when they are apparently missing part of their name. Please note that the underlying repository seems to have all the files intact and is fine - the code compiles, etc. This may just be a red herring, but here are a few examples:

The links with missing names here fail:

I was going to put more examples but new users can apparently only insert a single image.

Is there anything I can do to help troubleshoot?

Thank you,
–J

It appears that the two problematic files were renamed (moved) into a directory whose name is similar to the files’ names.

What was the original path/name of file #1, and what is its path/name now?

There were files moved around in a commit, yes. It was a much older project and everything in the project folder was in the root folder, “attire-allowance”.
A new sub-folder under the root folder was created with the same name, “attire-allowance”.
File #1 stayed where it was.
File #2 was moved into the new sub-directory (also named “attire-allowance”).

Thanks so it looks like Gitea isn’t displaying the renames/moves properly, possibly caused by the directory name being the same (except for the extension) as the filename(s).

Probably worth opening an issue in the Gitea repository for this.

Thank you - I will open an issue now.

Best,

–J

FYI already known and handled: https://github.com/go-gitea/gitea/pull/12771

1 Like