From 0868ee248c3b977a6f6e008a3511f12bd66fa9fd Mon Sep 17 00:00:00 2001 From: OttoMao Date: Mon, 20 Jul 2015 10:36:44 +0800 Subject: [PATCH] bugfix for map local in windows --- lib/rule_default.js | 2 +- package.json | 2 +- web/build/index.js | 2 +- web/page.js | 2 +- web/src/index.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rule_default.js b/lib/rule_default.js index 287f3f6..c306e68 100644 --- a/lib/rule_default.js +++ b/lib/rule_default.js @@ -94,7 +94,7 @@ module.exports = { app.get("/filetree",function(req,res){ try{ - var root = req.query.root || process.env.HOME || "/"; + var root = req.query.root || utils.getUserHome() || "/"; utils.filewalker(root,function(err, info){ res.json(info); }); diff --git a/package.json b/package.json index 19bd52c..12524e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anyproxy", - "version": "3.7.0Beta5", + "version": "3.7.0Beta6", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "main": "proxy.js", "bin": { diff --git a/web/build/index.js b/web/build/index.js index 2e4b948..0565f67 100644 --- a/web/build/index.js +++ b/web/build/index.js @@ -144,7 +144,7 @@ var recorder; (function(){ //detect whether to show the filter and map btn - $.get("/filetree?root=/",function(){ + $.get("/filetree",function(){ $(".J_filterSection").show(); }); diff --git a/web/page.js b/web/page.js index dd4de42..73e350e 100644 --- a/web/page.js +++ b/web/page.js @@ -190,7 +190,7 @@ (function(){ //detect whether to show the filter and map btn - $.get("/filetree?root=/",function(){ + $.get("/filetree",function(){ $(".J_filterSection").show(); }); diff --git a/web/src/index.js b/web/src/index.js index c8fb94e..084e398 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -144,7 +144,7 @@ var recorder; (function(){ //detect whether to show the filter and map btn - $.get("/filetree?root=/",function(){ + $.get("/filetree",function(){ $(".J_filterSection").show(); });