From 1ebe3cce6a4a4d26457a1585deb6230afc03be07 Mon Sep 17 00:00:00 2001 From: Alex Whitman Date: Fri, 28 Jul 2017 15:54:10 +0100 Subject: [PATCH] Revert "fix(content): make verified content completely read-only (#96)" This reverts commit 4131196d3b840b226cafc90fc71f9275f15dfb5d. --- lib/util/move-file.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/util/move-file.js b/lib/util/move-file.js index e12e981..422c829 100644 --- a/lib/util/move-file.js +++ b/lib/util/move-file.js @@ -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 @@ -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