Skip to content

Commit

Permalink
win... not supporting permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
mashpie committed Feb 6, 2016
1 parent c0a076e commit 83dda17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ i18n.configure({
// where to store json files - defaults to './locales' relative to modules directory
directory: './mylocales',

// controll mode on directory creation - defaults to NULL which defaults to umask of process user
// controll mode on directory creation - defaults to NULL which defaults to umask of process user. Setting has no effect on win.
directoryPermissions: '755',

// whether to write new locale information to disk - defaults to true
Expand Down
8 changes: 6 additions & 2 deletions test/i18n.configurePermissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var i18n = process.env.EXPRESS_COV ? require('../i18n-cov') : require('../i18n')
path = require("path"),
fs = require('fs');

var isWin = /^win/.test(process.platform);

describe('Module Config (directoryPermissions)', function () {

var testScope = {};
Expand Down Expand Up @@ -47,7 +49,8 @@ describe('Module Config (directoryPermissions)', function () {
});
testScope.__('Hello');
var stat = fs.lstatSync('./customlocales');
should.equal('40700', parseInt(stat.mode.toString(8), 10));
var mode = isWin? '40666':'40700';
should.equal(mode, parseInt(stat.mode.toString(8), 10));
should.exist(stat);
});

Expand All @@ -62,7 +65,8 @@ describe('Module Config (directoryPermissions)', function () {
});
testScope.__('Hello');
var stat = fs.lstatSync('./customlocales');
should.equal('40750', parseInt(stat.mode.toString(8), 10));
var mode = isWin? '40666':'40750';
should.equal(mode, parseInt(stat.mode.toString(8), 10));
should.exist(stat);
});

Expand Down

0 comments on commit 83dda17

Please sign in to comment.