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 committed Sep 13, 2023
1 parent c3078a2 commit 5a6f126
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 @@ -620,7 +620,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 5a6f126

Please sign in to comment.