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

Error: ENOTSUP: operation not supported on socket, chmod - Polyfills #159

Open
florian-kittel opened this issue Apr 4, 2019 · 1 comment

Comments

@florian-kittel
Copy link

This error handling causes, that our copysync with fs-extra to the network share is not working anymore.

function chmodFixSync (orig) {
    if (!orig) return orig
    return function (target, mode) {
      try {
        return orig.call(fs, target, mode)
      } catch (er) {
        if (!chownErOk(er)) throw er
      }
    }
  }

https://github.com/isaacs/node-graceful-fs/blob/master/polyfills.js#L248

I don't know why you need to check it, but is there a way to disable this? Because when I comment this line out, it works fine for the hole project.

Summery from the stack trace:

C:\Users\...\AppData\Roaming\npm\node_modules\...\node_modules\graceful-fs\polyfills.js:250
      if (!chownErOk(er)) throw er
                          ^

Error: ENOTSUP: operation not supported on socket, chmod '\\YOURNETWORKADDRESS'
    at Object.fs.chmodSync (fs.js:1123:18)
    at Object.chmodSync (C:\Users\...\AppData\Roaming\npm\node_modules\...\node_modules\graceful-fs\polyfills.js:248:19)
    at mkDirAndCopy (C:\Users\...\AppData\Roaming\npm\node_modules\...\node_modules\fs-extra\lib\copy-sync\copy-sync.js:107:13)
...
@coreyfarrell
Copy link
Collaborator

You are asking that we suppress all errors given from fs.chmodSync. I'm not sure how this is an issue with graceful-fs, if you ran require('fs').chmodSync('\\YOURNETWORKADDRESS') without loading graceful-fs wouldn't you get the same result?

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

No branches or pull requests

2 participants