From 00a3dbeb5d2ef22a793c667950c7ad150524ff64 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 30 Jan 2014 20:17:18 -0500 Subject: [PATCH] Remove unused cp_r preserveMode option I had originally created a commit which let preserveMode reuse the return value of the fs.statSync a few lines up in the file, but since the code is dead, there was no way to test it. Removing the dead code seemed like a better approach. (If you want to revert this commit, I recommend reusing the stat buffer!) --- tools/files.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/files.js b/tools/files.js index cdc2b0a079..51ac720dd5 100644 --- a/tools/files.js +++ b/tools/files.js @@ -281,9 +281,6 @@ files.mkdir_p = function (dir, mode) { // file whose basename matches one of the regexps, before // transformation, will be skipped. // -// If options.preserveMode is preset, an attempt will be made to -// preserve the file's mode (Unix permissions). -// // Returns the list of relative file paths copied to the destination, // as filtered by ignore and transformed by transformFilename. files.cp_r = function (from, to, options) { @@ -316,10 +313,6 @@ files.cp_r = function (from, to, options) { } copied.push(f); } - - if (options.preserveMode) { - fs.chmodSync(fullTo, fs.statSync(fullFrom).mode); - } }); return copied; };