diff --git a/src/cli/cli.cc b/src/cli/cli.cc index 55c56ef221..052cc65e64 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -5697,7 +5697,21 @@ int main (const int argc, const char* argv[]) { for (const auto& tuple : settings) { if (tuple.first.starts_with("webview_navigator_mounts_")) { - const auto key = replace(tuple.first, "webview_navigator_mounts_", ""); + const auto key = replace( + replace(tuple.first, "webview_navigator_mounts_", ""), + "mac_", + "" + ); + + if ( + key.starts_with("android") || + key.starts_with("ios") || + key.starts_with("linux") || + key.starts_with("win") + ) { + continue; + } + if (key.starts_with("$HOST_HOME") || key.starts_with("~")) { const auto path = replace(replace(key, "$HOST_HOME", ""), "~", ""); entitlementSettings["configured_entitlements"] += ( diff --git a/src/ipc/bridge.cc b/src/ipc/bridge.cc index 36b2d99991..e08561d575 100644 --- a/src/ipc/bridge.cc +++ b/src/ipc/bridge.cc @@ -3520,7 +3520,20 @@ namespace SSC::IPC { for (const auto& tuple : userConfig) { if (tuple.first.starts_with("webview_navigator_mounts_")) { - const auto key = replace(tuple.first, "webview_navigator_mounts_", ""); + auto key = replace(tuple.first, "webview_navigator_mounts_", ""); + + if (key.starts_with("android") && !platform.android) continue; + if (key.starts_with("ios") && !platform.ios) continue; + if (key.starts_with("linux") && !platform.linux) continue; + if (key.starts_with("mac") && !platform.mac) continue; + if (key.starts_with("win") && !platform.win) continue; + + key = replace(key, "android_", ""); + key = replace(key, "ios_", ""); + key = replace(key, "linux_", ""); + key = replace(key, "mac_", ""); + key = replace(key, "win_", ""); + const auto path = replace(replace(key, "$HOST_HOME", ""), "~", HOME); const auto& value = tuple.second; mounts.insert_or_assign(path, value);