gitea doctor will remove repo-avatar files #30037
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
type/bug
Milestone
Description
if a user configures a repo to have a custom avatar then gitea doctor check --fix --all deletes the associated avatar files.
STARTING CASE:

jupyterlab icon added to a repo
blob is found on the filesystem.
gitea doctor check --fix --all is executed and completes.
the repo-avatar directory is now empty.
viewing with a browser confirms the avatar is missing.

LEFT is chrome using cached image, RIGHT is incognito mode.
The behaviour of services/doctor/storage.go implies that orphaned files will be deleted
https://github.com/go-gitea/gitea/blob/e3e08dcc5184cdbdac5023fabaafba123a995c3e/services/doctor/storage.go#L92C1-L93C1
how to indicate that repo-avatars are not orphan files.
sidenote... what else could be classed as orphaned and incorrectly removed
Gitea Version
1.21.9
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
windows and linux
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: