diff --git a/Extractor.ps1 b/Extractor.ps1 index ad8bc7d..a6fd344 100644 --- a/Extractor.ps1 +++ b/Extractor.ps1 @@ -52,7 +52,7 @@ function ProduceHashMap { $lastState=($array[$array.Count-1]).state #Write-Host $lastState #Write-Host $backUpState - if (($lastState -eq 'Failed') -and ($backUpState -eq 'Failed')) { + if (($lastState -eq $backUpState) -or ($backUpState -eq 'Finished' -and $lastState -ne 'Started') -or ($backUpState -eq 'Failed' -and $lastState -ne 'Started')) { #Write-Host "skipping" continue } diff --git a/tests/extractortest malformed fail.txt b/tests/extractortest malformed fail.txt index 8898637..9a78cde 100644 --- a/tests/extractortest malformed fail.txt +++ b/tests/extractortest malformed fail.txt @@ -1,8 +1,11 @@ snrdaoeisnrdaoie:2024-02-06 20:00:00 gestartet VMware-Maschine 'test' +snrdaoeisnrdaoie:2024-02-06 20:00:00 gestartet VMware-Maschine 'test' snrdaoeisnrdaoie:2024-02-06 20:00:00 some harddrive operation nsriadoeisnrdaoei snrdaoeisnrdaoie:2024-02-06 20:00:00 some other Harddrive operation snrdaoeisnrdaoie:2024-02-06 20:01:00 VMware-Maschine 'test' Erfolgreiche +snrdaoeisnrdaoie:2024-02-06 20:01:00 VMware-Maschine 'test' Erfolgreiche +snrdaoeisnrdaoie:2024-02-06 20:01:00 VMware-Maschine 'test' snrdaoeisnrdaoie:2024-02-06 20:00:00 gestartet VMware-Maschine 'test2' snrdaoeisnrdaoie:2024-02-06 20:00:00 some harddrive operation