[longomatch] Create win32 valid filenames to save projects



commit d837a121b8bf08b1c15c675e2946a2fb6f0b3dc2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Apr 10 17:50:15 2011 +0200

    Create win32 valid filenames to save projects

 LongoMatch/Gui/MainWindow.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 5fb850f..ea6d4d6 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -208,6 +208,9 @@ namespace LongoMatch.Gui
 				MainClass.DB.AddProject(openedProject);
 			} catch (Exception ex){
 				string projectFile = filePath + "-" + DateTime.Now;
+				projectFile = projectFile.Replace("-", "_");
+				projectFile = projectFile.Replace(" ", "_");
+				projectFile = projectFile.Replace(":", "_");
 				Project.Export(openedProject, projectFile);
 				MessagePopup.PopupMessage(this, MessageType.Error,
 				                          Catalog.GetString("An error occured saving the project:\n")+ex.Message+ "\n\n"+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]