From fa5e1c4e8b8acf89ebe3a2e4704127024ae5f513 Mon Sep 17 00:00:00 2001 From: shudingbo Date: Tue, 12 Sep 2017 10:01:06 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=A4=8D=20=E4=BB=8E=20=E6=B7=98?= =?UTF-8?q?=E5=AE=9D=20=E8=8E=B7=E5=8F=96=E4=BD=8D=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=BE=93=E5=87=BA=E4=B8=B4=E6=97=B6=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/getloc.js | 11 ++--------- out/readme.txt | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) create mode 100644 out/readme.txt diff --git a/js/getloc.js b/js/getloc.js index bcfec88..035aba6 100644 --- a/js/getloc.js +++ b/js/getloc.js @@ -41,6 +41,7 @@ getLoc.getRecsLocation = function( cfg ) if( progress.length === 0 ){ let fileName = pathC.basename( cfg.savePath,'.bin' ); fileName += "_" + cfg.off[0] + ".bin"; + fileName = pathC.join( pathC.dirname( cfg.savePath ), fileName ); let fd = fs.openSync( fileName, 'w' ); fs.close( fd ); } @@ -113,15 +114,6 @@ function get_ip_location( ip ,cb ) req.end(); } -function writeRecByTemplate( rec,cfg ){ - let fileName = pathC.basename( cfg.savePath,'.bin' ); - fileName += "_" + cfg.off[0] + ".bin"; - let fd = fs.openSync( fileName , 'a+' ); - let loc = rec; - let msg = eval( cfg.template ) + "\n"; - fs.writeSync( fd, msg); - fs.closeSync( fd); -} function writeRecord( rec, loc,cfg ) { @@ -143,6 +135,7 @@ function writeRecord( rec, loc,cfg ) let fileName = pathC.basename( cfg.savePath,'.bin' ); fileName += "_" + cfg.off[0] + ".bin"; + fileName = pathC.join( pathC.dirname( cfg.savePath ), fileName ); let fd = fs.openSync( fileName , 'a+' ); let sIP = ipC.toLong( rec[0] ); diff --git a/out/readme.txt b/out/readme.txt new file mode 100644 index 0000000..c2e8945 --- /dev/null +++ b/out/readme.txt @@ -0,0 +1 @@ +Êä³öÎļþ¼Ð \ No newline at end of file