Skip to content

Commit 5c12a14

Browse files
committed
Defend against filename-only output paths
1 parent 710ab01 commit 5c12a14

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/Convert-PDB.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ catch {
3535
return
3636
}
3737

38-
New-Item -ItemType Directory -Force -Path (Split-Path $OutputPath -Parent) | Out-Null
38+
$outputDirectory = Split-Path $OutputPath -Parent
39+
if ($outputDirectory) {
40+
New-Item -ItemType Directory -Force -Path $outputDirectory | Out-Null
41+
}
3942

4043
$toolpath = "$pdb2pdbpath/tools/Pdb2Pdb.exe"
4144
$arguments = $DllPath, '/out', $OutputPath, '/nowarn', '0021'

0 commit comments

Comments
 (0)