Skip to content

Commit 1a5d8ab

Browse files
committed
Fix for handling spaces in local filenames
1 parent 2d898bf commit 1a5d8ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

obs-browser/main-source.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static uint32_t browser_source_get_height(void *data)
101101
}
102102

103103

104-
static const char *browser_source_get_name(void)
104+
static const char *browser_source_get_name(void *)
105105
{
106106
return obs_module_text("BrowserSource");
107107
}

shared/browser-scheme.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ bool BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest> request,
3131
CefRefPtr<CefCallback> callback)
3232
{
3333
CefURLParts parts;
34+
CefString fileName;
3435
CefParseURL(request->GetURL(), parts);
3536

3637
std::string path = CefString(&parts.path);
37-
fileName = path.substr(path.find_last_of("/") + 1);
38+
path = CefURIDecode(path,true,cef_uri_unescape_rule_t::UU_SPACES);
3839
#ifdef WIN32
3940
inputStream.open(path.erase(0,1), std::ifstream::binary);
4041
#else

0 commit comments

Comments
 (0)