From 6caf04ea0bed3fbddcbdf2b9a2f6defee13ece9d Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sun, 19 Jan 2014 23:26:59 +0100 Subject: [PATCH] Update issue #929 Status: Fixed --- Duplicati/Library/Main/Operation/RestoreHandler.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Duplicati/Library/Main/Operation/RestoreHandler.cs b/Duplicati/Library/Main/Operation/RestoreHandler.cs index a7ce8808c..06854f669 100644 --- a/Duplicati/Library/Main/Operation/RestoreHandler.cs +++ b/Duplicati/Library/Main/Operation/RestoreHandler.cs @@ -158,6 +158,11 @@ namespace Duplicati.Library.Main.Operation new RecreateDatabaseHandler(m_backendurl, m_options, (RecreateDatabaseResults)m_result.RecreateDatabaseResults) .DoRun(database, filter, filelistfilter, /*localpatcher*/null); + //If we have --version set, we need to adjust, as the db has only the required versions + //TODO: Bit of a hack to set options that way + if (m_options.Version != null && m_options.Version.Length > 0) + m_options.RawOptions["version"] = string.Join(",", Enumerable.Range(0, m_options.Version.Length).Select(x => x.ToString())); + DoRun(database, filter, m_result); } } @@ -235,6 +240,7 @@ namespace Duplicati.Library.Main.Operation using(var database = new LocalRestoreDatabase(dbparent, m_options.Blocksize)) using(var backend = new BackendManager(m_backendurl, m_options, result.BackendWriter, database)) { + database.SetResult(m_result); Utility.VerifyParameters(database, m_options); var blockhasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.BlockHashAlgorithm);