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

fs: fix operation not permitted #44783

Closed
wants to merge 2 commits into from
Closed

fs: fix operation not permitted #44783

wants to merge 2 commits into from

Conversation

thoqbk
Copy link
Contributor

@thoqbk thoqbk commented Sep 25, 2022

fix: #44720

issue:

  • copyDir() calls checkPathsSync(), which invokes lstat()
    which causes error because of not checking the opts.filter

changes:

  • check opts.filter before calling checkPathsSync and copy logic
  • cleanup startCopy function

fix: nodejs#44720

issue:
- [copyDir](https://github.com/nodejs/node/blob/7e0097d8a33fa7adbc1f298cbf647f6d2fd403e8/lib/internal/fs/cp/cp-sync.js#L287-L289) calls checkPathsSync(), which invokes lstat() which causes error because not checking the opts.filter

changes:
- check opts.filter before calling `checkPathsSync` and invoking copy logic
- cleanup `startCopy` function
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Sep 25, 2022
@thoqbk thoqbk changed the title fs.cp: fix operation not permitted fs: fix operation not permitted Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fs.cp] fails with EPERM despite filter
2 participants