Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gehriger <gehriger@gmail.com>2020-08-06 19:14:07 +0300
committerDaniel Gehriger <gehriger@gmail.com>2020-08-06 19:14:07 +0300
commitfcf44d595dc582d6627da1c71457989b6c9381b0 (patch)
tree02371a49a1a3a180ff5658318e0177d7c4fa2716 /Duplicati/Library
parent279d8d2d2c4b556028588909e65e8923cb65d73d (diff)
Restoring original scheduling of CountFilesHandler
Diffstat (limited to 'Duplicati/Library')
-rw-r--r--Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs5
-rw-r--r--Duplicati/Library/Main/Operation/BackupHandler.cs22
2 files changed, 13 insertions, 14 deletions
diff --git a/Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs b/Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs
index 59d4e999e..919e5d28f 100644
--- a/Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs
+++ b/Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs
@@ -20,21 +20,20 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Duplicati.Library.Utility;
-using Duplicati.Library.Snapshots;
using CoCoL;
namespace Duplicati.Library.Main.Operation.Backup
{
internal static class CountFilesHandler
{
- public static async Task Run(IEnumerable<string> sources, Snapshots.ISnapshotService snapshot, UsnJournalService journalService, BackupResults result, Options options, IFilter sourcefilter, IFilter filter, Common.ITaskReader taskreader, System.Threading.CancellationToken token)
+ public static async Task Run(IEnumerable<string> sources, Snapshots.ISnapshotService snapshot, BackupResults result, Options options, IFilter sourcefilter, IFilter filter, Common.ITaskReader taskreader, System.Threading.CancellationToken token)
{
// Make sure we create the enumeration process in a separate scope,
// but keep the log channel from the parent scope
using(Logging.Log.StartIsolatingScope(true))
using (new IsolatedChannelScope())
{
- var enumeratorTask = Backup.FileEnumerationProcess.Run(sources, snapshot, journalService, options.FileAttributeFilter, sourcefilter, filter, options.SymlinkPolicy, options.HardlinkPolicy, options.ExcludeEmptyFolders, options.IgnoreFilenames, options.ChangedFilelist, taskreader, token);
+ var enumeratorTask = Backup.FileEnumerationProcess.Run(sources, snapshot, null, options.FileAttributeFilter, sourcefilter, filter, options.SymlinkPolicy, options.HardlinkPolicy, options.ExcludeEmptyFolders, options.IgnoreFilenames, options.ChangedFilelist, taskreader, token);
var counterTask = AutomationExtensions.RunTask(new
{
Input = Backup.Channels.SourcePaths.ForRead
diff --git a/Duplicati/Library/Main/Operation/BackupHandler.cs b/Duplicati/Library/Main/Operation/BackupHandler.cs
index f78246cdd..8a4bd2768 100644
--- a/Duplicati/Library/Main/Operation/BackupHandler.cs
+++ b/Duplicati/Library/Main/Operation/BackupHandler.cs
@@ -442,6 +442,17 @@ namespace Duplicati.Library.Main.Operation
{
try
{
+ // Start parallel scan, or use the database
+ if (m_options.DisableFileScanner)
+ {
+ var d = m_database.GetLastBackupFileCountAndSize();
+ m_result.OperationProgressUpdater.UpdatefileCount(d.Item1, d.Item2, true);
+ }
+ else
+ {
+ parallelScanner = Backup.CountFilesHandler.Run(sources, snapshot, m_result, m_options, m_sourceFilter, m_filter, m_result.TaskReader, counterToken.Token);
+ }
+
// Make sure the database is sane
await db.VerifyConsistencyAsync(m_options.Blocksize, m_options.BlockhashSize, !m_options.DisableFilelistConsistencyChecks);
@@ -494,17 +505,6 @@ namespace Duplicati.Library.Main.Operation
// create USN-based scanner if enabled
var journalService = GetJournalService(sources, snapshot, filter, lastfilesetid);
- // Start parallel scan, or use the database
- if (m_options.DisableFileScanner)
- {
- var d = m_database.GetLastBackupFileCountAndSize();
- m_result.OperationProgressUpdater.UpdatefileCount(d.Item1, d.Item2, true);
- }
- else
- {
- parallelScanner = Backup.CountFilesHandler.Run(sources, snapshot, journalService, m_result, m_options, m_sourceFilter, m_filter, m_result.TaskReader, counterToken.Token);
- }
-
// Run the backup operation
if (await m_result.TaskReader.ProgressAsync)
{