[mistelix] If the preferences file is not present (new installation), we should not try to load insted of givin



commit adf2a6898778037817cd92b3d6038bc97bbb1b65
Author: Jordi Mas <jmas softcatala org>
Date:   Tue Jul 7 12:09:40 2009 +0100

    If the preferences file is not present (new installation), we should not try to load insted of giving an error report

 src/core/Preferences.cs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/core/Preferences.cs b/src/core/Preferences.cs
index 6c41f9e..4787cee 100644
--- a/src/core/Preferences.cs
+++ b/src/core/Preferences.cs
@@ -218,6 +218,10 @@ namespace Mistelix.Core
 		{
 			try {
 				LoadDefaultValues ();
+
+				if (File.Exists (file) == false)
+					return;
+
 				XmlTextReader reader = new XmlTextReader (file);
 				properties.ReadXml (reader);
 				reader.Close ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]