filerjs / filer

Node-like file system for browsers
BSD 2-Clause "Simplified" License
621 stars 154 forks source link

Path.resolve does not work #357

Closed gideonthomas closed 9 years ago

gideonthomas commented 9 years ago

Try:

Path.relative("/mydir", "/mydir/file");

Crashes with: TypeError: Object #<Object> has no method 'resolve'

humphd commented 9 years ago

https://github.com/joyent/node/blob/master/lib/path.js#L504-L530

humphd commented 9 years ago

I was about to fix this by adding missing code, but then I notice that it might just be as simple as changing these to simply resolve vs. exports.resolve: https://github.com/filerjs/filer/blob/develop/src/path.js#L123L124

humphd commented 9 years ago

@gideonthomas any chance you're willing to try testing this in Bramble? Just change https://github.com/humphd/brackets/blob/bramble/src/bramble/api.js#L28 to filer vs. filer.min and then change https://github.com/filerjs/filer/blob/develop/dist/filer.js#L2072-L2073 to resolve vs. exports.resolve. If that doesn't fix it, I'll look for a different solution, but I'm pretty sure that's it.

gideonthomas commented 9 years ago

So, I did what you said and it didn't work. But then I tried it in filer standalone itself. When I make the change in dist/filer.js, it still fails. But when I make the change in dist/path.js, it works.