Fixed problem of wstalrall format and genmac files were not copied into the fmtall and genmacall folders

This commit is contained in:
John Jenko 2013-02-05 16:38:07 +00:00
parent 398972fab1
commit 9f2b1a88bf

View File

@ -597,9 +597,11 @@ namespace fmtxml
{
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
FileInfo fi2 = new FileInfo(@"..\..\" + fileName);
if (fi2.Exists && fi1.Exists && fi2.LastAccessTimeUtc > fi1.LastAccessTimeUtc)
if (fi2.Exists && (!fi1.Exists ||(fi1.Exists && fi2.LastAccessTimeUtc > fi1.LastAccessTimeUtc)))
{
if (fi1.Exists && fi1.IsReadOnly) fi1.IsReadOnly = false;
fi2.CopyTo(fi1.FullName, true);
fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
}
if (fi1.Exists)
{
@ -612,10 +614,11 @@ namespace fmtxml
{
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
FileInfo fi2 = new FileInfo(@"..\..\" + fileName);
if (fi2.Exists && fi1.Exists && fi2.LastAccessTimeUtc > fi1.LastAccessTimeUtc)
if (fi2.Exists && (!fi1.Exists || (fi1.Exists && fi2.LastAccessTimeUtc > fi1.LastAccessTimeUtc)))
{
if (fi1.Exists && fi1.IsReadOnly) fi1.IsReadOnly = false;
fi2.CopyTo(fi1.FullName, true);
fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
}
if (fi1.Exists)
{