diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2021-11-19 15:40:14 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2021-11-19 15:40:29 +0300 |
commit | eca372aad469dfb5aa0353385f5f710d02b5e7d3 (patch) | |
tree | d96a9031796327e7725b1be0f6a1e11ba67639ba /lib | |
parent | 022f2b39bb45cea55ee9e0b38c6621e9bfbf17c7 (diff) |
ignore custom log files
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Cron/Manage.php | 4 | ||||
-rw-r--r-- | lib/Service/ConfigService.php | 1 | ||||
-rw-r--r-- | lib/Service/FilesService.php | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/Cron/Manage.php b/lib/Cron/Manage.php index 5cefcab..b07c420 100644 --- a/lib/Cron/Manage.php +++ b/lib/Cron/Manage.php @@ -47,9 +47,7 @@ use Throwable; * @package OCA\Backup\Cron */ class Manage extends TimedJob { - - - const DELAY_CHECK_HEALTH = 86400 * 7; // 7d + public const DELAY_CHECK_HEALTH = 86400 * 7; // 7d /** @var CronService */ private $cronService; diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 400ed6a..a113ad4 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -46,6 +46,7 @@ class ConfigService { public const MAINTENANCE = 'maintenance'; public const DATA_DIRECTORY = 'datadirectory'; + public const LOGFILE = 'logfile'; public const LOCK = 'lock'; public const REMOTE_ENABLED = 'remote_enabled'; diff --git a/lib/Service/FilesService.php b/lib/Service/FilesService.php index 84da6a8..5869d6b 100644 --- a/lib/Service/FilesService.php +++ b/lib/Service/FilesService.php @@ -105,9 +105,10 @@ class FilesService { */ public function fillRestoringData(RestoringData $data, string $path): void { if (!is_dir($data->getAbsolutePath() . rtrim($path, '/'))) { + $log = $this->configService->getSystemValue(ConfigService::LOGFILE) ?: 'nextcloud.log'; if ($data->getType() === RestoringData::ROOT_DATA && !$this->configService->getAppValueBool(ConfigService::INCLUDE_LOGS) - && substr($path, 0, 13) === 'nextcloud.log') { + && substr($path, 0, strlen($log)) === $log) { return; } |