File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,16 @@ function getPluginEntry(pluginDir, pluginName = "mpvjs.node") {
2929 const fullPluginPath = path . join ( pluginDir , pluginName ) ;
3030 // Try relative path to workaround ASCII-only path restriction.
3131 let pluginPath = path . relative ( process . cwd ( ) , fullPluginPath ) ;
32- // "./plugin" is required only on Linux.
33- if ( process . platform === "linux" && path . dirname ( pluginPath ) === "." ) {
34- pluginPath = `.${ path . sep } ${ pluginPath } ` ;
32+ if ( path . dirname ( pluginPath ) === "." ) {
33+ // "./plugin" is required only on Linux.
34+ if ( process . platform === "linux" ) {
35+ pluginPath = `.${ path . sep } ${ pluginPath } ` ;
36+ }
37+ } else {
38+ // Relative plugin paths doesn't work on Windows.
39+ if ( process . platform === "win32" ) {
40+ pluginPath = fullPluginPath ;
41+ }
3542 }
3643 if ( containsNonASCII ( pluginPath ) ) {
3744 throw new Error ( "Non-ASCII plugin path is not supported" ) ;
You can’t perform that action at this time.
0 commit comments