From 4c41fd691abdd60c6e86366a0133be79ff5485cb Mon Sep 17 00:00:00 2001 From: Rod Savard Date: Tue, 17 Mar 2020 06:48:00 -0700 Subject: [PATCH 1/3] only store inheritance breaks in metadata when true --- Duplicati/Library/Common/IO/SystemIOWindows.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Duplicati/Library/Common/IO/SystemIOWindows.cs b/Duplicati/Library/Common/IO/SystemIOWindows.cs index 13342f417..dc4fa9cc0 100644 --- a/Duplicati/Library/Common/IO/SystemIOWindows.cs +++ b/Duplicati/Library/Common/IO/SystemIOWindows.cs @@ -487,7 +487,11 @@ namespace Duplicati.Library.Common.IO objs.Add(new FileSystemAccess((FileSystemAccessRule)f)); dict["win-ext:accessrules"] = SerializeObject(objs); - dict["win-ext:accessrulesprotected"] = rules.AreAccessRulesProtected.ToString(); + + if (rules.AreAccessRulesProtected) + { + dict["win-ext:accessrulesprotected"] = rules.AreAccessRulesProtected.ToString(); + } return dict; } From b30fdfe34dc704e80ab1841d50b90622a2803835 Mon Sep 17 00:00:00 2001 From: Rod Savard Date: Tue, 17 Mar 2020 21:35:19 -0700 Subject: [PATCH 2/3] add comment and simplify key value assignment --- Duplicati/Library/Common/IO/SystemIOWindows.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Duplicati/Library/Common/IO/SystemIOWindows.cs b/Duplicati/Library/Common/IO/SystemIOWindows.cs index dc4fa9cc0..756bfad66 100644 --- a/Duplicati/Library/Common/IO/SystemIOWindows.cs +++ b/Duplicati/Library/Common/IO/SystemIOWindows.cs @@ -488,9 +488,13 @@ namespace Duplicati.Library.Common.IO dict["win-ext:accessrules"] = SerializeObject(objs); + // Only include the following key when its value is True. + // This prevents unnecessary 'metadata change' detections when upgrading from + // older versions (pre-2.0.5.101) that didn't store this value at all. + // When key is not present, its value is presumed False by the restore code. if (rules.AreAccessRulesProtected) { - dict["win-ext:accessrulesprotected"] = rules.AreAccessRulesProtected.ToString(); + dict["win-ext:accessrulesprotected"] = "True"; } return dict; From c247d01c6e48306f793a9331ab4595dd5a319b6d Mon Sep 17 00:00:00 2001 From: Rod Savard Date: Wed, 18 Mar 2020 04:57:25 -0700 Subject: [PATCH 3/3] remove spaces --- Duplicati/Library/Common/IO/SystemIOWindows.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Common/IO/SystemIOWindows.cs b/Duplicati/Library/Common/IO/SystemIOWindows.cs index 756bfad66..e91fb0537 100644 --- a/Duplicati/Library/Common/IO/SystemIOWindows.cs +++ b/Duplicati/Library/Common/IO/SystemIOWindows.cs @@ -490,7 +490,7 @@ namespace Duplicati.Library.Common.IO // Only include the following key when its value is True. // This prevents unnecessary 'metadata change' detections when upgrading from - // older versions (pre-2.0.5.101) that didn't store this value at all. + // older versions (pre-2.0.5.101) that didn't store this value at all. // When key is not present, its value is presumed False by the restore code. if (rules.AreAccessRulesProtected) {