mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
25 lines
802 B
C#
25 lines
802 B
C#
namespace Phantom.Common.Data.Backups;
|
|
|
|
public enum BackupCreationResultKind : byte {
|
|
UnknownError = 0,
|
|
Success = 1,
|
|
InstanceNotRunning = 2,
|
|
BackupTimedOut = 3,
|
|
BackupCancelled = 4,
|
|
BackupAlreadyRunning = 5,
|
|
BackupFileAlreadyExists = 6,
|
|
CouldNotCreateBackupFolder = 7,
|
|
CouldNotCopyWorldToTemporaryFolder = 8,
|
|
CouldNotCreateWorldArchive = 9
|
|
}
|
|
|
|
public static class BackupCreationResultSummaryExtensions {
|
|
public static bool ShouldRetry(this BackupCreationResultKind kind) {
|
|
return kind != BackupCreationResultKind.Success &&
|
|
kind != BackupCreationResultKind.InstanceNotRunning &&
|
|
kind != BackupCreationResultKind.BackupCancelled &&
|
|
kind != BackupCreationResultKind.BackupAlreadyRunning &&
|
|
kind != BackupCreationResultKind.BackupFileAlreadyExists;
|
|
}
|
|
}
|