unset any attributes when deleting files

For users who copy D3DRM.DLL from disc, the file may have been copied with a
read only attribute by default, which is preserved in the copy Rebuilder makes
and prevents Rebuilder from re-copying on subsequent runs. This commit clears
all file attributes before re-copying so that this doesn't happen.
This commit is contained in:
itsmattkc 2020-03-23 19:22:48 +11:00
parent 960669fd55
commit 7b6b2c446e

View file

@ -1025,6 +1025,7 @@ namespace Rebuilder
for (int i = 0; i < dest_files.Length; i++)
{
Log("Deleting existing file: " + dest_files[i]);
File.SetAttributes(dest_files[i], FileAttributes.Normal);
File.Delete(dest_files[i]);
}
}