Skip to content

Commit

Permalink
Mount-DbaDatabase: Deduplicate filepaths if more that one backup is i…
Browse files Browse the repository at this point in the history
…n the last backup file (#9504)
  • Loading branch information
andreasjordan authored Oct 14, 2024
1 parent 5224351 commit 7eec680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/Mount-DbaDatabase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function Mount-DbaDatabase {
}

$backupfile = $backuphistory.Path[0]
$filepaths = (Read-DbaBackupHeader -SqlInstance $server -FileList -Path $backupfile).PhysicalName
$filepaths = (Read-DbaBackupHeader -SqlInstance $server -FileList -Path $backupfile).PhysicalName | Select-Object -Unique

$FileStructure = New-Object System.Collections.Specialized.StringCollection
foreach ($file in $filepaths) {
Expand Down

0 comments on commit 7eec680

Please sign in to comment.