We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e12582 commit 826f9d0Copy full SHA for 826f9d0
1 file changed
Commands/Sources/Add-OBSBrowserSource.ps1
@@ -135,13 +135,19 @@ dynamicParam {
135
}
136
if ($uri.Scheme -eq 'File') {
137
if (Test-Path $uri.AbsolutePath) {
138
- $myParameterData["local_file"] = "$uri"
+ $myParameterData["local_file"] = "$uri" -replace '[\\/]', '/'
139
$myParameterData["is_local_file"] = $true
140
141
142
else
143
{
144
- $myParameterData["url"] = "$uri"
+ if (Test-Path $uri) {
145
+ $rp = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($uri)
146
+ $myParameterData["local_file"] = "$rp" -replace '[\\/]', '/'
147
+ $myParameterData["is_local_file"] = $true
148
+ } else {
149
+ $myParameterData["url"] = "$uri"
150
+ }
151
152
153
if (-not $Name) {
0 commit comments