Fixed problem using a dash character in the Title field. Bug Fix : B2012-292, fix the saving of the Title field when creating a new Word section

Added a check for the existence of a temporary word file before trying to create it
Part two of fix for bug B2012-292, don’t delete word section if user deletes the Title text in the step editor
This commit is contained in:
2012-11-05 18:58:13 +00:00
parent ca98dba877
commit 4ed39bda97
3 changed files with 9 additions and 4 deletions

View File

@@ -332,6 +332,10 @@ namespace VEPROMS.CSLA.Library
if (_MyDocument != null)
{
_MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}{3}", VlnSettings.TemporaryFolder, MyDocument.DocID, Unique, MyDocument.FileExtension));
while (_MyFile.Exists)
{
_MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}{3}", VlnSettings.TemporaryFolder, MyDocument.DocID, Unique, MyDocument.FileExtension));
}
FileStream fs = _MyFile.Create();
if (MyDocument.DocContent != null) fs.Write(MyDocument.DocContent, 0, MyDocument.DocContent.Length);
fs.Close();