Skip to content

Commit

Permalink
fix: btrfs: temporary snapshot was not always properly deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
sloonz committed Nov 27, 2023
1 parent be784dc commit 6d6cadc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (s *btrfsSource) CreateBackup(baseSnapshot *uback.Snapshot) (uback.Backup,
}
args = append(args, tmpSnapshotPath)
return uback.WrapSourceCommand(backup, exec.Command(args[0], args[1:]...), func(err error) error {
if err != nil {
if err != nil || s.snapshotsPath == "" {
args = nil
args = append(args, s.deleteCommand...)
args = append(args, tmpSnapshotPath)
Expand Down

0 comments on commit 6d6cadc

Please sign in to comment.