Fixed the code to allow reading various parameters from the manifest when restoring the database.
This change ensures that the update happens, even when creating a partial database as the GUI does. This fixes #2323
This commit is contained in:
@@ -92,7 +92,7 @@ namespace Duplicati.Library.Main.Operation
|
||||
using(var backend = new BackendManager(m_backendurl, m_options, m_result.BackendWriter, restoredb))
|
||||
{
|
||||
restoredb.RepairInProgress = true;
|
||||
|
||||
var autoDetectBlockSize = !(m_options.HasBlocksize && restoredb.GetDbOptions().ContainsKey("blocksize"));
|
||||
var volumeIds = new Dictionary<string, long>();
|
||||
|
||||
var rawlist = backend.List();
|
||||
@@ -205,7 +205,7 @@ namespace Duplicati.Library.Main.Operation
|
||||
|
||||
var parsed = VolumeBase.ParseFilename(entry.Name);
|
||||
|
||||
if (!hasUpdatedOptions && !updating)
|
||||
if (!hasUpdatedOptions && (!updating || autoDetectBlockSize))
|
||||
{
|
||||
VolumeReaderBase.UpdateOptionsFromManifest(parsed.CompressionModule, tmpfile, m_options);
|
||||
hasUpdatedOptions = true;
|
||||
|
||||
@@ -1457,6 +1457,11 @@ namespace Duplicati.Library.Main
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether a blocksize has been specified
|
||||
/// </summary>
|
||||
public bool HasBlocksize { get { return m_options.ContainsKey("blocksize") && !string.IsNullOrEmpty(m_options["blocksize"]); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of file-blocks
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user