SIL.FieldWorks.UnicodeCharEditor.PUAInstaller.RestoreFiles C# (CSharp) Method

RestoreFiles() public method

Copies the backup files over the source files and then deletes the backup files.
public RestoreFiles ( ) : void
return void
		public void RestoreFiles()
		{
			for (var i = m_undoFileStack.Count; --i >= 0; )
			{
				var frame = m_undoFileStack[i];
				var fi = new FileInfo(frame.m_backupFile);
				if (fi.Exists)
				//				if (File.Exists(frame.backupFile))
				{
					// Use the safe versions of the methods so that the process can continue
					// even if there are errors.
					SafeFileCopyWithLogging(frame.m_backupFile, frame.m_originalFile, true);
					if (fi.Length <= 0)
					{
						// no data in the backup file, remove originalFile also
						SafeDeleteFile(frame.m_originalFile);
					}
					SafeDeleteFile(frame.m_backupFile);
				}
			}
		}
		#endregion