[longomatch] Create directory if it doesn exists
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Create directory if it doesn exists
- Date: Mon, 7 Jul 2014 11:32:35 +0000 (UTC)
commit def9503d64b772565785ee909e77d7943bf06e50
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Jun 30 14:39:18 2014 +0200
Create directory if it doesn exists
LongoMatch.Services/Services/TemplatesService.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Services/Services/TemplatesService.cs
b/LongoMatch.Services/Services/TemplatesService.cs
index 59abbd3..cdbdf4f 100644
--- a/LongoMatch.Services/Services/TemplatesService.cs
+++ b/LongoMatch.Services/Services/TemplatesService.cs
@@ -141,6 +141,10 @@ namespace LongoMatch.Services
"the name: ") + filename);
}
+ if (!Directory.Exists (Path.GetDirectoryName (filename))) {
+ Directory.CreateDirectory (Path.GetDirectoryName (filename));
+ }
+
/* Don't cach the Exception here to chain it up */
template.Save(filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]