[longomatch] Throw exception of the prefix is not found
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Throw exception of the prefix is not found
- Date: Fri, 7 Sep 2012 16:15:30 +0000 (UTC)
commit ec2293e5d3f7ed64d1c6dd82b739b4a4c670e861
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Sep 7 18:15:08 2012 +0200
Throw exception of the prefix is not found
LongoMatch.Services/Services/Core.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Services/Services/Core.cs b/LongoMatch.Services/Services/Core.cs
index 9c8580c..6f8a569 100644
--- a/LongoMatch.Services/Services/Core.cs
+++ b/LongoMatch.Services/Services/Core.cs
@@ -155,8 +155,11 @@ namespace LongoMatch.Services
string home;
Config.baseDirectory = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"../");
- if (!System.IO.File.Exists(System.IO.Path.Combine(Config.baseDirectory, "share", "longomatch")))
+ if (!System.IO.Directory.Exists(System.IO.Path.Combine(Config.baseDirectory, "share", "longomatch"))) {
Config.baseDirectory = System.IO.Path.Combine(Config.baseDirectory, "../");
+ }
+ if (!System.IO.Directory.Exists(System.IO.Path.Combine(Config.baseDirectory, "share", "longomatch")))
+ throw new Exception("Aborting: Prefix directory not found");
/* Check for the magic file PORTABLE to check if it's a portable version
* and the config goes in the same folder as the binaries */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]