# Gitea "View File" issue

**URL:** <https://forum.gitea.com/t/gitea-view-file-issue/2493>\
**Category:** Install/Maintain/Configure\
**Created:** [September 10, 2020, 11:29pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493 "2020-09-10T23:29:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsraz](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jsraz](https://forum.gitea.com/u/jsraz)\
**Post date:** [September 10, 2020, 11:29pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/1 "2020-09-10T23:29:53Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/1X/065bdeed005e26cf70babf63f51438f1dd9631aa.png)

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

---

<div class="post-metadata">

**Author:** ![kpfleming](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kpfleming](https://forum.gitea.com/u/kpfleming)\
**Post date:** [September 11, 2020, 10:26am UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/2 "2020-09-11T10:26:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jsraz](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jsraz](https://forum.gitea.com/u/jsraz)\
**Post date:** [September 11, 2020, 2:50pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/3 "2020-09-11T14:50:49Z")

</div>

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”).

---

<div class="post-metadata">

**Author:** ![kpfleming](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kpfleming](https://forum.gitea.com/u/kpfleming)\
**Post date:** [September 11, 2020, 8:05pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/4 "2020-09-11T20:05:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jsraz](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jsraz](https://forum.gitea.com/u/jsraz)\
**Post date:** [September 11, 2020, 8:36pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/5 "2020-09-11T20:36:44Z")

</div>

Thank you - I will open an issue now.

Best,

–J

---

<div class="post-metadata">

**Author:** ![jsraz](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jsraz](https://forum.gitea.com/u/jsraz)\
**Post date:** [September 11, 2020, 11:45pm UTC](https://forum.gitea.com/t/gitea-view-file-issue/2493/6 "2020-09-11T23:45:06Z")

</div>

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