fix v86_bin_fallback full path: getDirname (2) (#624)

Fix v86_bin_fallback when wasm_path is given
This commit is contained in:
proxy-m 2022-02-17 16:15:58 +03:00 committed by GitHub
parent 5199c3dc87
commit e7f574f4d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,6 +160,9 @@ function V86Starter(options)
if(options["wasm_path"])
{
v86_bin = options["wasm_path"];
const slash = v86_bin.lastIndexOf("/");
const dir = slash === -1 ? "" : v86_bin.substr(0, slash);
v86_bin_fallback = dir + "/" + v86_bin_fallback;
}
else if(typeof window === "undefined" && typeof __dirname === "string")
{