[mistelix/stable] If the preferences file is not present (new installation), we should not try to load insted of givin
- From: Jordi Mas <jmas src gnome org>
- To: svn-commits-list gnome org
- Subject: [mistelix/stable] If the preferences file is not present (new installation), we should not try to load insted of givin
- Date: Tue, 7 Jul 2009 11:12:13 +0000 (UTC)
commit 58b908a9a6469699bd4a46bdb174fa9d5f5a9cd1
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 9e51319..0076160 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]