Skip to content

Commit f042386

Browse files
Replace placeholders only once
1 parent 647b73c commit f042386

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Backup/Source/Tar.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ private function setupIncrementalSettings()
202202
*/
203203
private function isLevelZeroTime(string $date, array $values): bool
204204
{
205-
foreach ($values as $value) {
206-
if (Util\Path::replaceDatePlaceholders($date, $this->time) === $value) {
205+
$currentDateValue = Util\Path::replaceDatePlaceholders($date, $this->time);
206+
foreach ($values as $configuredValue) {
207+
if ($currentDateValue === $configuredValue) {
207208
return true;
208209
}
209210
}

0 commit comments

Comments
 (0)