예제 #1
0
        private static void MoveTempOldFileToBackupDir(IReplayConfiguration config, string tempOldFile)
        {
            string currentDateString = FileOperations.GetCurrentDateString();
            string text  = Path.Combine(config.E00LogBackupPath, currentDateString + "E00OutOfDate");
            string text2 = EseHelper.MakeLogFilePath(config, 0L, text);

            FileOperations.CreateDirectoryIfNeeded(text);
            LastLogReplacer.Tracer.TraceDebug <string, string, string>(0L, "MoveTempOldFileToBackupDir(): '{0}': Moving temporary old file '{1}' to backup file '{2}'", config.DisplayName, tempOldFile, text2);
            File.Move(tempOldFile, text2);
        }
예제 #2
0
        // Token: 0x06001D6E RID: 7534 RVA: 0x000855C4 File Offset: 0x000837C4
        private void AttemptRepair(long generation, string logToRepairFullFileName)
        {
            string path = this.Config.BuildShortLogfileName(generation);
            string text = Path.Combine(this.m_workingPath, path);

            this.CopyAndVerifyFromActive(generation, text);
            string text2 = Path.Combine(this.Config.DestinationLogPath, "CorruptLogs");

            FileOperations.CreateDirectoryIfNeeded(text2);
            string text3 = Path.Combine(text2, path);

            if (File.Exists(text3))
            {
                File.Delete(logToRepairFullFileName);
            }
            else
            {
                File.Move(logToRepairFullFileName, text3);
            }
            File.Move(text, logToRepairFullFileName);
            LogRepair.Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "AttemptRepair({0}): succeeded on {1}.", this.Config.DisplayName, logToRepairFullFileName);
        }