diff options
-rw-r--r-- | Mono.Addins/ChangeLog | 6 | ||||
-rw-r--r-- | Mono.Addins/Mono.Addins.Database/AddinScanResult.cs | 14 | ||||
-rw-r--r-- | Mono.Addins/Mono.Addins/ExtensionNode.cs | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/Mono.Addins/ChangeLog b/Mono.Addins/ChangeLog index a18c217..df857cb 100644 --- a/Mono.Addins/ChangeLog +++ b/Mono.Addins/ChangeLog @@ -1,3 +1,9 @@ +2008-09-03 Lluis Sanchez Gual <lluis@novell.com> + + * Mono.Addins/ExtensionNode.cs: Fix potential race. + * Mono.Addins.Database/AddinScanResult.cs: Set the changesFound flag + when all data needs to be regenerated. + 2008-08-22 Lluis Sanchez Gual <lluis@novell.com> * Mono.Addins.csproj, Mono.Addins.mdp: Use msbuild file format for diff --git a/Mono.Addins/Mono.Addins.Database/AddinScanResult.cs b/Mono.Addins/Mono.Addins.Database/AddinScanResult.cs index 27e5730..12f964e 100644 --- a/Mono.Addins/Mono.Addins.Database/AddinScanResult.cs +++ b/Mono.Addins/Mono.Addins.Database/AddinScanResult.cs @@ -51,9 +51,10 @@ namespace Mono.Addins.Database Hashtable assemblyLocationsByFullName = new Hashtable (); Hashtable filesToIgnore; + bool regenerateRelationData; + bool changesFound; + public bool RegenerateAllData; - public bool RegenerateRelationData; - public bool changesFound; public bool CheckOnly; public bool LocateAssembliesOnly; public string Domain; @@ -62,6 +63,15 @@ namespace Mono.Addins.Database get { return changesFound; } set { changesFound = value; } } + + public bool RegenerateRelationData { + get { return regenerateRelationData; } + set { + regenerateRelationData = value; + if (value) + ChangesFound = true; + } + } public bool VisitFolder (string folder) { diff --git a/Mono.Addins/Mono.Addins/ExtensionNode.cs b/Mono.Addins/Mono.Addins/ExtensionNode.cs index 1a99f93..b048ac6 100644 --- a/Mono.Addins/Mono.Addins/ExtensionNode.cs +++ b/Mono.Addins/Mono.Addins/ExtensionNode.cs @@ -123,8 +123,6 @@ namespace Mono.Addins if (childrenLoaded) return childNodes; - childrenLoaded = true; - try { if (treeNode.Children.Count == 0) { childNodes = ExtensionNodeList.Empty; @@ -135,6 +133,8 @@ namespace Mono.Addins AddinManager.ReportError (null, null, ex, false); childNodes = ExtensionNodeList.Empty; return childNodes; + } finally { + childrenLoaded = true; } ArrayList list = new ArrayList (); |