-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Closed
Copy link
Labels
💊 bugSomething isn't workingSomething isn't working
Description
Gogs version
0.13.3
Git version
- Server: 2.47.3
- Client: 2.52.0.windows.1
Operating system
Debian 13
Database
SQLite 3
Describe the bug
I'm recovering my instance after a server failure with a slightly outdated DB file. Some repositories that physically exist on the disk are not shown in Gogs, which is expected. I've just tried to add (recover) a "new" repository, which already exists by adding a new repo with the same name that it had before the failure.
Achieved result:
- Gogs alerts about the path already exists and wipes the repository files completely, and they cannot be recovered anymore
To reproduce
- Put the git repo files in your repository ROOT/{user} catalog
- Try to add this repo using UI
- Observe the files were removed
Expected behavior
- Gogs alerts about the path already exists and does nothing more
OR - Gogs merges existing repo files with the "new" repo (less expected for security reasons)
Additional context
UI log message:
An error has occurred : initRepository: initRepository: path already exists: /mnt/Repositories/{user}/{repoName}.git
Test log message:
[ERROR] [...gogs/internal/route/repo/repo.go:100 handleCreateError()] CreatePost: initRepository: initRepository: path already exists: /mnt/Repositories/{user}/{repoName}.git
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
💊 bugSomething isn't workingSomething isn't working