Skip to content

Commit

Permalink
Fixes constants (#6432)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis authored and Maël Nison committed Sep 26, 2018
1 parent f880587 commit ff8e225
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/fs-normalized.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import fs from 'fs';
import {promisify} from './promise.js';

import {constants} from './fs';

export type CopyFileAction = {
src: string,
dest: string,
Expand Down Expand Up @@ -37,7 +39,7 @@ export const unlink: (path: string) => Promise<void> = promisify(require('rimraf
*/
export const copyFile = async function(data: CopyFileAction, cleanup: () => mixed): Promise<void> {
// $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);
Expand Down

0 comments on commit ff8e225

Please sign in to comment.