Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Wrong EEXIST error message for fs.linkSync #6510

Closed
joliss opened this issue Nov 14, 2013 · 3 comments
Closed

Wrong EEXIST error message for fs.linkSync #6510

joliss opened this issue Nov 14, 2013 · 3 comments
Assignees

Comments

@joliss
Copy link

joliss commented Nov 14, 2013

On Node v0.10.22, the EEXIST error message for fs.linkSync is mixed up.

$ touch a b; node -e "var fs = require('fs'); fs.linkSync('a', 'b')"

fs.js:748
  return binding.link(pathModule._makeLong(srcpath),
                 ^
Error: EEXIST, file already exists 'a'
    at Object.fs.linkSync (fs.js:748:18)
    at [eval]:1:28
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:532:25)
    at startup (node.js:80:7)
    at node.js:901:3

It should be file already exists: 'b' instead, I think.

@indutny
Copy link
Member

indutny commented Nov 14, 2013

Confirming. Working on it.

@ghost ghost assigned indutny Nov 14, 2013
indutny added a commit to indutny/node that referenced this issue Nov 16, 2013
@indutny
Copy link
Member

indutny commented Nov 16, 2013

Should be fixed by #6530.

@joliss
Copy link
Author

joliss commented Nov 16, 2013

Thanks @indutny!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants