[mistelix] Fixes small errors
- From: Jordi Mas <jmas src gnome org>
- To: svn-commits-list gnome org
- Subject: [mistelix] Fixes small errors
- Date: Sun, 26 Jul 2009 08:53:54 +0000 (UTC)
commit 23df2708cba94e0ef544933ab143d3a773dc70e4
Author: Jordi Mas <jmas softcatala org>
Date: Sun Jul 26 10:53:37 2009 +0200
Fixes small errors
src/core/Logger.cs | 10 +++-------
src/core/Preferences.cs | 2 +-
src/mistelix.cs | 2 +-
3 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/core/Logger.cs b/src/core/Logger.cs
index 78887a9..23c82ab 100644
--- a/src/core/Logger.cs
+++ b/src/core/Logger.cs
@@ -61,13 +61,9 @@ namespace Mistelix.Core
public FileLogger ()
{
try {
- log = File.CreateText (Path.Combine (
-#if WIN32
- Services.NativeApplication.ConfDir,
-#else
- Environment.GetEnvironmentVariable ("HOME"),
-#endif
- ".mistelix.log"));
+ string home = Environment.GetEnvironmentVariable ("HOME");
+ log = File.CreateText (Path.Combine (home != null ? home: string.Empty,
+ ".mistelix.log"));
log.Flush ();
} catch (IOException) {
// FIXME: Use temp file
diff --git a/src/core/Preferences.cs b/src/core/Preferences.cs
index 4787cee..3607766 100644
--- a/src/core/Preferences.cs
+++ b/src/core/Preferences.cs
@@ -266,7 +266,7 @@ namespace Mistelix.Core
}
}
}
- catch (FileNotFoundException) { }
+ catch (Exception) { }
if (directory == null)
return Environment.GetFolderPath (Environment.SpecialFolder.Personal);
diff --git a/src/mistelix.cs b/src/mistelix.cs
index 9ac8d39..40a6402 100644
--- a/src/mistelix.cs
+++ b/src/mistelix.cs
@@ -197,7 +197,7 @@ namespace Mistelix
try {
SetProcessName (Defines.APPNAME_LOWER);
- } catch (Exception e) {
+ } catch (Exception) {
Logger.Error ("Mistelix.Main. Cannot set process");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]