Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Revert "fix(content): make verified content completely read-only (#96)" #106

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/util/move-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

const fs = require('graceful-fs')
const BB = require('bluebird')
const chmod = BB.promisify(fs.chmod)
const unlink = BB.promisify(fs.unlink)
let move
let pinflight

Expand All @@ -29,11 +27,8 @@ function moveFile (src, dest) {
return cb(err)
}
}
return cb()
return fs.unlink(src, cb)
})
}).then(() => {
// content should never change for any reason, so make it read-only
return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444'))
}).catch(err => {
if (process.platform !== 'win32') {
throw err
Expand Down