-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.
Description
- Version:
v10.12.0, v11.1.0 - Platform:
Darwin Mac.r 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64 - Subsystem:
Simply run the code below:
$ node
fs.mkdirSync('xyz')
fs.copyFileSync('xyz', 'abc')
On Windows, it results EPERM
, but on mac, it creates an empty directory unexpectedly. The behaviours are not consistent.
Since the API is named copyFile, rather than copyDirectory, it should not be able to copy a directory, and should throw ENOTDIR
in my first mind.
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.