fix(win): repalce fswin with winattr

This commit is contained in:
Evan Morikawa 2015-12-10 12:44:44 -05:00
parent a3686e3f83
commit d1d34963e2
3 changed files with 8 additions and 8 deletions

View file

@ -27,7 +27,6 @@
"event-kit": "^1.0.2",
"fs-plus": "^2.3.2",
"fstream": "0.1.24",
"fswin": "2.15.1031",
"grim": "1.5.0",
"guid": "0.0.10",
"immutable": "3.7.5",
@ -71,7 +70,8 @@
"temp": "^0.8",
"theorist": "^1.0",
"underscore": "^1.8",
"underscore.string": "^3.0"
"underscore.string": "^3.0",
"winattr": "1.1.0"
},
"packageDependencies": {},
"private": true,

View file

@ -47,8 +47,8 @@ setupConfigDir = (args) ->
mkdirp.sync(configDirPath)
if process.platform is 'win32'
fsWin=require('fswin')
fsWin.setAttributesSync(pathToFileOrDir, {IS_HIDDEN: true})
winattr=require('winattr')
winattr.setSync(configDirPath, {hidden: true})
process.env.NYLAS_HOME = configDirPath

View file

@ -52,7 +52,7 @@
};
setupConfigDir = function(args) {
var configDirPath, defaultConfigDir, fsWin, ref, ref1;
var configDirPath, defaultConfigDir, ref, ref1, winattr;
if (args.specMode) {
defaultConfigDir = path.join(app.getPath('home'), '.nylas-spec');
} else {
@ -61,9 +61,9 @@
configDirPath = (ref = (ref1 = args.configDirPath) != null ? ref1 : process.env.NYLAS_HOME) != null ? ref : defaultConfigDir;
mkdirp.sync(configDirPath);
if (process.platform === 'win32') {
fsWin = require('fswin');
fsWin.setAttributesSync(pathToFileOrDir, {
IS_HIDDEN: true
winattr = require('winattr');
winattr.setSync(configDirPath, {
hidden: true
});
}
process.env.NYLAS_HOME = configDirPath;