apache / cordova-plugman

Apache Cordova Plugman
https://cordova.apache.org/
Apache License 2.0
399 stars 151 forks source link

[CB-4609] Issue #2 - Fix for windows path and plugin loading. #23

Closed jbondc closed 10 years ago

bshepherdson commented 10 years ago

This fix is actually the wrong way around. Since we're dealing here with web-browser paths separated by /, it's wrong to be using path.* functions at all. On Unixy systems it's fine, but on Windows we're looking for and inserting backslashes, when the web browser is ultimately expecting forward slashes.

The path given in the plugin.xml should always be with /s, and this code should be splitting and joining explicitly on those in most places, and only using path.* when it's actually about to call the local filesystem. The plugin.xml and cordova_plugins.js output file both require / on all platforms, so we should be explicit.

Unfortunately the people working on the CLI tools are working on Macs, primarily, because of needing to build for iOS, so these bugs slip through. I'll patch it today.