[longomatch/redesign2: 3/159] Create win32 valid filenames to save projects



commit 368998957ee446622806b6cae3533341869297de
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]