From ff8e225e4501811252a753abe3e56ffae1dd176e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Wed, 26 Sep 2018 12:55:56 +0100 Subject: [PATCH] Fixes constants (#6432) --- src/util/fs-normalized.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/fs-normalized.js b/src/util/fs-normalized.js index b0dbd76327..abb2325d95 100644 --- a/src/util/fs-normalized.js +++ b/src/util/fs-normalized.js @@ -5,6 +5,8 @@ import fs from 'fs'; import {promisify} from './promise.js'; +import {constants} from './fs'; + export type CopyFileAction = { src: string, dest: string, @@ -37,7 +39,7 @@ export const unlink: (path: string) => Promise = promisify(require('rimraf */ export const copyFile = async function(data: CopyFileAction, cleanup: () => mixed): Promise { // $FlowFixMe: Flow doesn't currently support COPYFILE_FICLONE - const ficloneFlag = fs.constants.COPYFILE_FICLONE || 0; + const ficloneFlag = constants.COPYFILE_FICLONE || 0; try { await unlink(data.dest); await copyFilePoly(data.src, data.dest, ficloneFlag, data);