Fixed problem of wstalrall format and genmac files were not copied into the fmtall and genmacall folders
This commit is contained in:
parent
398972fab1
commit
9f2b1a88bf
@ -597,9 +597,11 @@ namespace fmtxml
|
|||||||
{
|
{
|
||||||
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
||||||
FileInfo fi2 = new FileInfo(@"..\..\" + 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);
|
fi2.CopyTo(fi1.FullName, true);
|
||||||
|
fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
||||||
}
|
}
|
||||||
if (fi1.Exists)
|
if (fi1.Exists)
|
||||||
{
|
{
|
||||||
@ -612,10 +614,11 @@ namespace fmtxml
|
|||||||
{
|
{
|
||||||
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
FileInfo fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
||||||
FileInfo fi2 = new FileInfo(@"..\..\" + 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;
|
if (fi1.Exists && fi1.IsReadOnly) fi1.IsReadOnly = false;
|
||||||
fi2.CopyTo(fi1.FullName, true);
|
fi2.CopyTo(fi1.FullName, true);
|
||||||
|
fi1 = new FileInfo(Application.StartupPath + "\\" + fileName);
|
||||||
}
|
}
|
||||||
if (fi1.Exists)
|
if (fi1.Exists)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user