Merge pull request #53 from Gloridea/master

fix unix socket is not working due to previous fix
This commit is contained in:
Brandon Nozaki Miller 2015-12-03 08:49:47 -08:00
commit 3c11bdaaff

View file

@ -47,8 +47,10 @@ function connect(){
if(!client.port){ if(!client.port){
client.log('Connecting client on Unix Socket :'.debug, client.path.variable); client.log('Connecting client on Unix Socket :'.debug, client.path.variable);
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
var path = client.path; var path = client.path;
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
path = path.replace(/^\//, ''); path = path.replace(/^\//, '');
path = path.replace(/\//g, '-'); path = path.replace(/\//g, '-');
path= '\\\\.\\pipe\\'+path; path= '\\\\.\\pipe\\'+path;