mafintosh / tar-fs

fs bindings for tar-stream
MIT License
350 stars 75 forks source link

Maintain the context the stat call in case xfs is an ES6 class #74

Closed CMCDragonkai closed 4 years ago

CMCDragonkai commented 6 years ago

I'm using tar-fs with a custom in-memory FS implementation. However the https://github.com/MatrixAI/js-virtualfs is implemented with an ES6 class.

The current way of passing the stat or lstat function fails because passing it that way loses the this context. By instead using a string, we maintain the this context. I ran the tests, and it still all works.

mafintosh commented 6 years ago

Thanks for the PR! See my comment :)

mafintosh commented 4 years ago

Fixed in master