Skip to content

gitea doctor will remove repo-avatar files  #30037

Closed
@eeyrjmr

Description

@eeyrjmr

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:
2024-03-24_00-03-1711240637
jupyterlab icon added to a repo

2024-03-24_00-03-1711240546
blob is found on the filesystem.

gitea doctor check --fix --all is executed and completes.

2024-03-24_00-03-1711240764
the repo-avatar directory is now empty.

viewing with a browser confirms the avatar is missing.
2024-03-24_00-03-1711240894
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions