Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODEFS cannot read files from sparse disk image when mounted with absolute path under OSX #3222

Closed
janjongboom opened this issue Mar 3, 2015 · 3 comments

Comments

@janjongboom
Copy link
Contributor

I have a sparse disk image (f.e. to have a case-sensitive file system) on OS/X, which is mapped from /Volumes/repos to /Users/janjongboom/repos. Now when I mount my full file system through NODEFS:

FS.mount(NODEFS, { root: '/' }, '/test');

And then trying to read a file from the disk image through C++:

FILE* fd = fopen("/test/Users/janjongboom/repos/janos/README.md", "r");

It fails, because NODEFS readlink() returns /Volumes/repos. Which is incorrect. It should take the mountpoint of the filesystem into account, because this folder is mapped on /test/Volumes/repos.

Patch in #3223

@stale
Copy link

stale bot commented Aug 31, 2019

This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

@sbc100
Copy link
Collaborator

sbc100 commented May 5, 2024

I now think the fix for this issue was wrong. If you have links to /Volumes/repos in your filesystem, but /Volumes/repos is not part of the emscripten VFS then they should not be readable. i.e. they are effectivly dangling symlinks from the POV of the emscripten filesystem, even though they point a valid location in the external filesystem.

For this kind of thing to would you would either need to mount /Volumes/repos inside the VFS, or use NODERAWFS.

@sbc100
Copy link
Collaborator

sbc100 commented May 6, 2024

We are looking at effectively reverting this change in #21805

sbc100 pushed a commit that referenced this issue May 8, 2024
…21805)

This PR reverts the behaviour that was added in #3277 and suggested in #3222.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants