fix dirname

This commit is contained in:
加里 2014-08-13 13:52:31 +08:00
parent 61e2821fe6
commit 655e15cd04
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ var exec = require('child_process').exec,
asyncTask = require("./asyncTaskMgr"); asyncTask = require("./asyncTaskMgr");
var certDir = path.join(getUserHome(),"/.anyproxy_certs/"), var certDir = path.join(getUserHome(),"/.anyproxy_certs/"),
cmdDir = "./cert/", cmdDir = path.join(__dirname,"..","./cert/"),
asyncTaskMgr = new asyncTask(); asyncTaskMgr = new asyncTask();
if(!fs.existsSync(certDir)){ if(!fs.existsSync(certDir)){
@ -61,6 +61,7 @@ function clearCerts(cb){
} }
function checkRootCA(){ function checkRootCA(){
var crtFile = path.join(cmdDir,"rootCA.crt"), var crtFile = path.join(cmdDir,"rootCA.crt"),
keyFile = path.join(cmdDir,"rootCA.key"); keyFile = path.join(cmdDir,"rootCA.key");

View File

@ -1,6 +1,6 @@
{ {
"name": "anyproxy", "name": "anyproxy",
"version": "0.2.3", "version": "0.2.4",
"description": "https proxy over http", "description": "https proxy over http",
"main": "proxy.js", "main": "proxy.js",
"bin": { "bin": {