From a8905a4da861db4be3258b0d8037a6c93e94b9f8 Mon Sep 17 00:00:00 2001 From: Albertony Date: Mon, 20 Mar 2017 12:30:32 +0100 Subject: [PATCH 1/2] Fixed issue #2387: Volume size cannot be set to 1 MB --- Duplicati/Server/Database/Connection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Server/Database/Connection.cs b/Duplicati/Server/Database/Connection.cs index 5f63af48e..896126f5d 100644 --- a/Duplicati/Server/Database/Connection.cs +++ b/Duplicati/Server/Database/Connection.cs @@ -403,7 +403,7 @@ namespace Duplicati.Server.Database try { var ds = Library.Utility.Sizeparser.ParseSize(s.Value); - if (ds <= 1024 * 1024) + if (ds < 1024 * 1024) return "DBlock size must be at least 1MB"; } catch From c87f3946df5aab722cd167c3d94b1c045ae11627 Mon Sep 17 00:00:00 2001 From: Albertony Date: Mon, 20 Mar 2017 12:36:08 +0100 Subject: [PATCH 2/2] Fixed unreported issue: The block size validation was not triggered, and did also not allow setting the value to 1KB (similar to issue #2387) --- Duplicati/Server/Database/Connection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Server/Database/Connection.cs b/Duplicati/Server/Database/Connection.cs index 896126f5d..7b4b81437 100644 --- a/Duplicati/Server/Database/Connection.cs +++ b/Duplicati/Server/Database/Connection.cs @@ -411,12 +411,12 @@ namespace Duplicati.Server.Database return "DBlock value must be a valid size string"; } } - else if (string.Equals(s.Name, "blocksize", StringComparison.InvariantCultureIgnoreCase)) + else if (string.Equals(s.Name, "--blocksize", StringComparison.InvariantCultureIgnoreCase)) { try { var ds = Library.Utility.Sizeparser.ParseSize(s.Value); - if (ds <= 1024 || ds > int.MaxValue) + if (ds < 1024 || ds > int.MaxValue) return "The blocksize must be at least 1KB"; } catch