From 141422ee384fda83e3e1d4af2727bc9dca799f68 Mon Sep 17 00:00:00 2001 From: Ray Bellis Date: Thu, 17 Dec 2015 15:59:28 +0000 Subject: [PATCH] Update ncp.js allow copying of character or block devices (NB: copies contents, not the inode) --- lib/copy/ncp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/copy/ncp.js b/lib/copy/ncp.js index 30886990..d30cae57 100644 --- a/lib/copy/ncp.js +++ b/lib/copy/ncp.js @@ -69,7 +69,7 @@ function ncp (source, dest, options, callback) { if (stats.isDirectory()) { return onDir(item) - } else if (stats.isFile()) { + } else if (stats.isFile() || stats.isCharacterDevice() || stats.isBlockDevice()) { return onFile(item) } else if (stats.isSymbolicLink()) { // Symlinks don't really need to know about the mode.