diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2020-12-19 16:44:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-19 16:44:21 +0300 |
commit | ca073a2d0c5225998addb9162d8bf54966fc8e15 (patch) | |
tree | e319a1dd4df925ec98fd5381b4981c128bafcc27 /Duplicati/Library | |
parent | 8002d3d22574f142a78129541007c78de2c0b5cd (diff) | |
parent | 780f53b89a08ff10f940c4266741e7eb2c890543 (diff) |
Merge pull request #4380 from warwickmm/fix_purge_broken_files_dry_run
Fix error encountered during dry-run of purge-broken-files
Diffstat (limited to 'Duplicati/Library')
-rw-r--r-- | Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs b/Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs index 7458477c1..e90a44070 100644 --- a/Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs +++ b/Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs @@ -85,6 +85,11 @@ namespace Duplicati.Library.Main.Operation SetCount = db.GetFilesetFileCount(x.Item2, tr)
}).ToArray();
+ if (m_options.Dryrun)
+ tr.Rollback();
+ else
+ tr.Commit();
+
var fully_emptied = compare_list.Where(x => x.RemoveCount == x.SetCount).ToArray();
var to_purge = compare_list.Where(x => x.RemoveCount != x.SetCount).ToArray();
@@ -167,11 +172,6 @@ namespace Duplicati.Library.Main.Operation }
}
- if (m_options.Dryrun)
- tr.Rollback();
- else
- tr.Commit();
-
m_result.OperationProgressUpdater.UpdateProgress(0.95f);
if (!m_options.Dryrun && db.RepairInProgress)
|