Skip to content

Commit

Permalink
Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric O'Connor committed Aug 5, 2014
1 parent e5684ac commit cf8e5fd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/dest/writeContents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ function writeContents(writePath, file, cb) {
if (file.stat && typeof file.stat.mode === 'number') {
fs.stat(writePath, function(err, st) {
if (err) {
done(err);
return;
return done(err);
}
// octal 7777 = decimal 4095
if ((st.mode & 4095) !== file.stat.mode) {
fs.chmod(writePath, file.stat.mode, done);
} else {
done(null);
if ((st.mode & 4095) === file.stat.mode) {
return done();
}
fs.chmod(writePath, file.stat.mode, done);
});
return;
}
Expand Down

0 comments on commit cf8e5fd

Please sign in to comment.