Author: lluis
Date: 2006-09-12 05:47:10 -0400 (Tue, 12 Sep 2006)
New Revision: 65288
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.AddIns.Setup/SetupService.cs
Log:
2006-09-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Core.AddIns.Setup/SetupService.cs: Don't crash if
a repository file can't be found.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog 2006-09-12
09:43:56 UTC (rev 65287)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog 2006-09-12
09:47:10 UTC (rev 65288)
@@ -1,3 +1,8 @@
+2006-09-12 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Core.AddIns.Setup/SetupService.cs: Don't crash if
+ a repository file can't be found.
+
2006-08-30 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Core.AddIns.Setup/SetupService.cs: Added support
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.AddIns.Setup/SetupService.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.AddIns.Setup/SetupService.cs
2006-09-12 09:43:56 UTC (rev 65287)
+++
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.AddIns.Setup/SetupService.cs
2006-09-12 09:47:10 UTC (rev 65288)
@@ -912,6 +912,11 @@
return;
}
+ if (newRep == null) {
+ monitor.ReportError (GettextCatalog.GetString
("Could not get information from repository") + ": " + absUri.ToString (),
null);
+ return;
+ }
+
monitor.Step (1);
foreach (ReferenceRepositoryEntry re in
newRep.Repositories) {
@@ -920,7 +925,7 @@
RepositoryRecord refRep = FindRepositoryRecord
(refRepUrl);
if (refRep == null)
refRep = RegisterRepository (refRepUrl,
true);
- if (refRep.LastModified < re.LastModified) {
+ if (refRep != null && refRep.LastModified <
re.LastModified) {
UpdateRepository (monitor, refRepUri,
refRep);
}
}
@@ -934,9 +939,8 @@
ArrayList allAddins = new ArrayList ();
Repository rootrep = (Repository) ReadObject (mainPath,
typeof(Repository));
- if (rootrep == null) {
+ if (rootrep == null)
rootrep = new Repository ();
- }
BuildRepository (monitor, rootrep, path, "root.mrep",
allAddins);
WriteObject (mainPath, rootrep);
@@ -952,9 +956,8 @@
string mainPath = Path.GetDirectoryName (mainFile);
Repository mainrep = (Repository) ReadObject (mainFile,
typeof(Repository));
- if (mainrep == null) {
+ if (mainrep == null)
mainrep = new Repository ();
- }
bool modified = false;
@@ -996,7 +999,7 @@
if (repEntry != null) {
if (repEntry.LastModified < lastModified)
repEntry.LastModified = lastModified;
- } else {
+ } else if (File.Exists (mainFile)) {
repEntry = new ReferenceRepositoryEntry ();
repEntry.LastModified = lastModified;
repEntry.Url = relFilePath;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches