Skip to content

Commit 4b9eab8

Browse files
committed
Send ignored_files as a string to wings
1 parent 5d03c0d commit 4b9eab8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/Repositories/Wings/DaemonBackupRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Pterodactyl\Repositories\Wings;
44

5+
use Illuminate\Support\Arr;
56
use Webmozart\Assert\Assert;
67
use Pterodactyl\Models\Backup;
78
use Pterodactyl\Models\Server;
@@ -48,7 +49,7 @@ public function backup(Backup $backup): ResponseInterface
4849
'json' => [
4950
'adapter' => $this->adapter ?? config('backups.default'),
5051
'uuid' => $backup->uuid,
51-
'ignored_files' => $backup->ignored_files,
52+
'ignore' => implode('\n', $backup->ignored_files),
5253
],
5354
]
5455
);

app/Services/Backups/InitiateBackupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public function handle(Server $server, string $name = null, bool $override = fal
117117
}
118118

119119
// Check if the server has reached or exceeded it's backup limit
120-
if (!$server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
120+
if (! $server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
121121
// Do not allow the user to continue if this server is already at its limit and can't override.
122-
if (!$override || $server->backup_limit <= 0) {
122+
if (! $override || $server->backup_limit <= 0) {
123123
throw new TooManyBackupsException($server->backup_limit);
124124
}
125125

0 commit comments

Comments
 (0)