Skip to content

Commit

Permalink
Fixing issue danielsogl#789 - File.writeFile was broken.
Browse files Browse the repository at this point in the history
Prior to this patch, `File.writeFile` has the `replace` and `append`
options flipped; setting `replace: true` would block the file from being
replaced, and setting `append: true` would always create a new file and
never append.
  • Loading branch information
wwoods committed Nov 16, 2016
1 parent 2dacec0 commit 348c5cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ export class File {
}

let getFileOpts: Flags = {
create: true,
exclusive: options.replace
create: !options.append,
exclusive: !options.replace
};

return File.resolveDirectoryUrl(path)
Expand Down

0 comments on commit 348c5cb

Please sign in to comment.