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 ba16853 commit 5e12582Copy full SHA for 5e12582
1 file changed
Commands/Sources/Add-OBSBrowserSource.ps.ps1
@@ -118,13 +118,19 @@ function Add-OBSBrowserSource
118
119
if ($uri.Scheme -eq 'File') {
120
if (Test-Path $uri.AbsolutePath) {
121
- $myParameterData["local_file"] = "$uri"
+ $myParameterData["local_file"] = "$uri" -replace '[\\/]', '/'
122
$myParameterData["is_local_file"] = $true
123
}
124
125
else
126
{
127
- $myParameterData["url"] = "$uri"
+ if (Test-Path $uri) {
128
+ $rp = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($uri)
129
+ $myParameterData["local_file"] = "$rp" -replace '[\\/]', '/'
130
+ $myParameterData["is_local_file"] = $true
131
+ } else {
132
+ $myParameterData["url"] = "$uri"
133
+ }
134
135
136
0 commit comments