isomorphic-git / lightning-fs

A lean and fast 'fs' for the browser
MIT License
476 stars 47 forks source link

Fix for reading from nested symlinks #35

Closed fuzzyTew closed 4 years ago

fuzzyTew commented 4 years ago

CacheFS._lookup doesn't follow any symlink pathname parts at all when not following symlinks, throwing ENOENT if a path is passed containing symlinks. This means you can't lstat or readlink a link by a path containing symlinks.

This patch adds a fix, dereferencing all path components but the last if follow is not set, and adds a test for the bug.

isomorphic-git-bot commented 4 years ago

:tada: This PR is included in version 3.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

billiegoose commented 4 years ago

This patch adds a fix, dereferencing all path components but the last if follow is not set, and adds a test for the bug.

Aha! I knew there was a bug kinda like this with my symlink implementation, I just hadn't had time to investigate it. Thank you so much!!