Gozala / cfx-js

CLI tool for Mozilla Add-on SDK
http://documentup.com/gozala/cfx-js
2 stars 0 forks source link

wrong paths on windows #1

Open ochameau opened 12 years ago

ochameau commented 12 years ago

We should use native path separator only in path attribute. In all other places, we should use unix one, /. Currently, we end up with stuff like this:

  "./lib\\main": {
    "type": "local",
    "path": "C:\\Users\\Alex\\Desktop\\mozilla\\addon-sdk\\examples\\reddit-panel\\lib\\main.js",
    "id": "./lib\\main",
    "requirements": {
      "self": "..\\..\\packages\\api-utils\\lib\\self",
      "panel": "..\\..\\packages\\addon-kit\\lib\\panel",
      "tabs": "..\\..\\packages\\addon-kit\\lib\\tabs",
      "widget": "..\\..\\packages\\addon-kit\\lib\\widget"
    }
  },
  "..\\..\\packages\\api-utils\\lib\\self": {
    "type": "deprecated",
    "path": "..\\..\\packages\\api-utils\\lib\\self.js",
    "id": "..\\..\\packages\\api-utils\\lib\\self",
    "warning": {
      "type": "core"
    },
    "requirements": {
      "chrome": "chrome",
      "@loader/options": "@loader/options"
    }
  },
Gozala commented 12 years ago

Ah right! I used node's path module to do path / id resolutions and did not realized I would end up with backslashes :)