Exemplo n.º 1
0
        private void BackupSave(GameSaveDir gsd, BackupOptions opt)
        {
            if (null != opt.BackupDir)
            {
                try
                {
                    string backupPath;
                    bool   backupCreated;
                    gsd.Backup(opt.BackupDir, out backupPath, out backupCreated);

                    if (backupCreated)
                    {
                        LogVerbose("Backed up save game files to: {0}", backupPath);
                    }
                    else
                    {
                        LogVerbose("Backup file already exists: {0}", backupPath);
                    }
                }
                catch (Exception x)
                {
                    throw new Exception(string.Format("Error backing up save game files: {0}", x.Message), x);
                }
            }
        }
Exemplo n.º 2
0
 private void RunBackup(BackupOptions opt)
 {
     try
     {
         BackupSave(opt.BackupDir, opt.FullBackup);
     }
     catch (Exception x)
     {
         throw new Exception(string.Format("Error backing up save game: {0}", x.Message));
     }
 }