Closed
Description
Description
My server's disk usage grew after the last update. If figured out that my backup files were stored twice: Once with the proper .tar.xz
extension, and once with a .tar.tar.xz
extension.
The problem is, that more is added as an extension than was trimmed before: https://github.com/go-gitea/gitea/blob/main/cmd/dump.go#L163
package main
import (
"fmt"
"path"
"strings"
)
const (
fileName = "gitea.dump.tar.xz"
outType = "tar.xz"
)
func main() {
fileName := strings.TrimSuffix(fileName, path.Ext(fileName))
fileName += "." + outType
fmt.Println(fileName)
}
Output:
gitea.dump.tar.tar.xz
Gitea Version
1.16.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.25.1
Operating System
Ubuntu 20.04 LTS
How are you running Gitea?
Directly on a VM, i.e. not in a container.
Database
PostgreSQL