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!)
This commit is contained in:
David Glasser
2014-01-30 20:17:18 -05:00
parent f5f42e96d5
commit 00a3dbeb5d

View File

@@ -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;
};