Skip to content

Commit 7eec680

Browse files
Mount-DbaDatabase: Deduplicate filepaths if more that one backup is in the last backup file (#9504)
1 parent 5224351 commit 7eec680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/Mount-DbaDatabase.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function Mount-DbaDatabase {
115115
}
116116

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

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

0 commit comments

Comments
 (0)