fix things

This commit is contained in:
2025-08-18 19:38:42 +02:00
parent 97cd8f065f
commit b2425d310b
6 changed files with 82 additions and 154 deletions

View File

@@ -268,8 +268,6 @@ func (l Service) PullBackup(gameID, backupID string, cli *client.Client) error {
return fmt.Errorf("failed to pull backup: %w", err)
}
return nil
}
@@ -372,6 +370,10 @@ func (l Service) ApplyBackup(gameID, backupID string) error {
return l.apply(filepath.Join(path, "data.tar.gz"), g.Path)
}
func (l Service) Repository() repository.Repository {
return l.repo
}
func (l Service) apply(src, dst string) error {
if err := os.RemoveAll(dst); err != nil {
return fmt.Errorf("failed to remove old save: %w", err)