lib: add missing flag to openAsync()

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Change-type: patch
This commit is contained in:
Petros Angelatos 2018-03-08 14:58:36 -08:00
parent f273da4828
commit 7d03de51f6
No known key found for this signature in database
GPG Key ID: 7DE8B46CDBCB42A1

View File

@ -19,6 +19,6 @@ exports.writeFileAtomic = (path, data) ->
exports.safeRename = (src, dest) ->
fs.renameAsync(src, dest)
.then ->
fs.openAsync(path.dirname(dest))
fs.openAsync(path.dirname(dest), 'r')
.tap(fs.fsyncAsync)
.then(fs.closeAsync)