Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach(fileList file in parser.files)
- {
- string absolutePath = file.name.Replace("/", "\\");
- if (!filesInDirectory.Contains(AppDomain.CurrentDomain.BaseDirectory + absolutePath))
- {
- filesToDownLoad.Add(file.name);
- }
- else
- {
- ExistingFile existingFile = new ExistingFile(file.name,GetCheckSum(file.name));
- FILE_ERR err = parser.DoesFileMatch(existingFile.fileName, existingFile.checkSum, existingFile.fileSize);
- if (err != FILE_ERR.FERR_OK)
- {
- switch (err)
- {
- case FILE_ERR.FERR_CHECKSUMMISMATCH:
- case FILE_ERR.FERR_SIZEMISMATCH:
- {
- filesToDownLoad.Add(file.name);
- }
- break;
- case FILE_ERR.FERR_NOFILEFOUND:
- {
- using (System.IO.StreamWriter writer = new System.IO.StreamWriter("dlErr.txt", true))
- {
- writer.WriteLine("Error Downloading %s, file does not exist in the patcher.", existingFile.fileName);
- }
- }
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement