Skip to content

Follow symlinks in readdir() and readdirSync() - #56

Merged
tschaub merged 1 commit into
tschaub:masterfrom
caitp:issue-14
Aug 13, 2015
Merged

Follow symlinks in readdir() and readdirSync()#56
tschaub merged 1 commit into
tschaub:masterfrom
caitp:issue-14

Conversation

@caitp

@caitp caitp commented Aug 12, 2015

Copy link
Copy Markdown
Contributor

Closes #14

@caitp

caitp commented Aug 12, 2015

Copy link
Copy Markdown
Contributor Author

Let me know if the indentation style used in tests aren't to your linking, not sure if the linter rules will complain if they're not.

This patch will resolve symlinks in the same way open() and stat() will, so I assume it's correct.

@caitp

caitp commented Aug 12, 2015

Copy link
Copy Markdown
Contributor Author

This isn't quite ready yet

caitp added a commit to caitp/cauliflower-filter that referenced this pull request Aug 12, 2015
@caitp

caitp commented Aug 12, 2015

Copy link
Copy Markdown
Contributor Author

This feels okay now

Comment thread lib/filesystem.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there might be an issue here with <link> -> <link> -> <file>-type paths or something

@tschaub

tschaub commented Aug 13, 2015

Copy link
Copy Markdown
Owner

Thanks for this @caitp! It looks like there might be more work needed to recursively follow links, but I think this is a nice enhancement.

tschaub added a commit that referenced this pull request Aug 13, 2015
Follow symlinks in readdir() and readdirSync().
@tschaub
tschaub merged commit ff3ea15 into tschaub:master Aug 13, 2015
@tschaub

tschaub commented Aug 13, 2015

Copy link
Copy Markdown
Owner

Published as mock-fs@3.1.0.

@caitp

caitp commented Aug 13, 2015

Copy link
Copy Markdown
Contributor Author

Thanks for this @caitp! It looks like there might be more work needed to recursively follow links, but I think this is a nice enhancement.

I sent a followup with a bit more work on this portion --- I believe this matches the typical posix/libc behaviour, but I need to check that as it's been a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants