Merge pull request #4142 from drwtsn32x/refine-storing-inheritance-breaks

Avoid rescan due to existence of new metadata option
This commit is contained in:
warwickmm
2020-03-18 17:00:31 -07:00
committed by GitHub
@@ -487,7 +487,15 @@ namespace Duplicati.Library.Common.IO
objs.Add(new FileSystemAccess((FileSystemAccessRule)f));
dict["win-ext:accessrules"] = SerializeObject(objs);
dict["win-ext:accessrulesprotected"] = rules.AreAccessRulesProtected.ToString();
// 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"] = "True";
}
return dict;
}