-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dependencies: applying patch for
cp-file
package (sindresorhus/cpy#86)
- Loading branch information
1 parent
34d338c
commit e7406a2
Showing
3 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/cp-file/index.js b/node_modules/cp-file/index.js | ||
index b049482..e86f439 100644 | ||
--- a/node_modules/cp-file/index.js | ||
+++ b/node_modules/cp-file/index.js | ||
@@ -12,7 +12,9 @@ const cpFileAsync = async (source, destination, options, progressEmitter) => { | ||
progressEmitter.size = stat.size; | ||
|
||
const read = await fs.createReadStream(source); | ||
- await fs.makeDir(path.dirname(destination)); | ||
+ if(!(process.platform === "win32" && /\w:\\/.test(path.resolve(path.dirname(destination), "/")))){ | ||
+ await fs.makeDir(path.dirname(destination), {mode: options.directoryMode}); | ||
+ } | ||
const write = fs.createWriteStream(destination, {flags: options.overwrite ? 'w' : 'wx'}); | ||
read.on('data', () => { | ||
progressEmitter.written = write.bytesWritten; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters