fix(cli): Remove O_DIRECT & O_EXCL

This removes O_DIRECT and O_EXCL flags from the writer,
as O_DIRECT can lead to EINVAL under quite a few circumstances,
and O_EXCL has proven to be useless.

Change-Type: patch
This commit is contained in:
Jonas Hermsmeier 2018-02-16 18:00:10 +01:00
parent 4fa0f990e5
commit 7063f254c6
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -88,10 +88,8 @@ exports.writeImage = (imagePath, drive, options, onProgress) => {
}).then(() => {
/* eslint-disable no-bitwise */
const flags = fs.constants.O_RDWR |
fs.constants.O_EXCL |
fs.constants.O_NONBLOCK |
fs.constants.O_SYNC |
fs.constants.O_DIRECT
fs.constants.O_SYNC
/* eslint-enable no-bitwise */
return fs.openAsync(driveObject.raw, flags)