Skip to content

Commit

Permalink
BUG/MINOR: fix get raw with version to use backup folder
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 authored and mjuraga committed Nov 7, 2023
1 parent deb1f51 commit aa237d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configuration/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ func (t *Transaction) getBackupFile(version int64) (string, error) {
if version == 0 {
return t.ConfigurationFile, nil
}
backupFileName := fmt.Sprintf("%v.%v", t.ConfigurationFile, version)
fileName := fmt.Sprintf("%v.%v", t.ConfigurationFile, version)
backupFileName := filepath.Join(t.BackupsDir, filepath.Base(fileName))

if _, err := os.Stat(backupFileName); err == nil {
return backupFileName, nil
Expand Down

0 comments on commit aa237d5

Please sign in to comment.