Skip to content

Commit

Permalink
Dividing by zero can't happen.
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbarmaster committed Feb 11, 2024
1 parent 139ce4a commit 1cf7e2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MinecraftService/Service/Server/BedrockBackupManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ public virtual bool PerformBackup(string queryString) {
int currentFileCount = 0;
foreach (FileInfo levelFile in levelFiles) {
currentFileCount++;
if(currentFileCount % progressCallCount == 0) {
_logger.AppendLine($"Adding files to archive. {currentFileCount / 6}% complete...");
try {
if (progressCallCount != 0 && currentFileCount % progressCallCount == 0) {
_logger.AppendLine($"Adding files to archive. {currentFileCount / 6}% complete...");
}
} catch {
}
backupZip.CreateEntryFromFile(levelFile.FullName, $"{_serverConfiguration.GetProp(MmsDependServerPropKeys.LevelName)}/{levelFile.Name}");
}
Expand Down

0 comments on commit 1cf7e2f

Please sign in to comment.