[longomatch] Create dashboards dir if it does not exists
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Create dashboards dir if it does not exists
- Date: Tue, 28 Oct 2014 09:50:01 +0000 (UTC)
commit 4e051b84ffaee817478cbff2aac82473e44e042a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Oct 21 11:58:39 2014 +0200
Create dashboards dir if it does not exists
LongoMatch.Services/Services/TemplatesService.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Services/Services/TemplatesService.cs
b/LongoMatch.Services/Services/TemplatesService.cs
index 91863fe..2441fd7 100644
--- a/LongoMatch.Services/Services/TemplatesService.cs
+++ b/LongoMatch.Services/Services/TemplatesService.cs
@@ -122,6 +122,9 @@ namespace LongoMatch.Services
public List<string> TemplatesNames {
get {
List<string> l = new List<string> ();
+ if (!Directory.Exists (basePath)) {
+ Directory.CreateDirectory (basePath);
+ }
foreach (string path in Directory.GetFiles (basePath, "*" + extension)) {
l.Add (Path.GetFileNameWithoutExtension (path));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]