In node's fs module, relative paths work with their functions: `fs.writeFileSync('here.txt', 'content')` Which would write to $PWD/here.txt. The same does not work in our SDK, as it needs an absolute path, since it is ultimately passed into an nsILocalFile, nsIFileOutputStream, or other similar functions.
What would you evaluate it relative to?
node does it relative to `__dirname` -- not sure if we can do something similar, especially with a xpi'd addon.
I don't know what __dirname is. Unless fs can read inside xpi files then making it relative to main.js wouldn't make sense. Neither would making it relative to the XPI really. Relative to the profile is about the only thing I can think of.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.