@@ -24,8 +24,8 @@ var fs = require('fs'),
2424var launched_from_installer = false ;
2525var platform = os . platform ( ) ;
2626switch ( platform ) {
27- case "darwin" :
28- platform = "mac" ;
27+ case "darwin" :
28+ platform = "mac" ;
2929}
3030var version = app . getVersion ( ) ;
3131var trayMenu = null ;
@@ -134,7 +134,7 @@ var kill_local_server = function() {
134134} ;
135135
136136var start_local_server = function ( ) {
137- if ( fs . existsSync ( serverPath ) ) {
137+ if ( fs . existsSync ( serverPath ) ) {
138138 if ( pendingKill ) {
139139 pendingKill . once ( 'close' , startAfterClose = ( ) => {
140140 start_local_server ( ) ;
@@ -167,18 +167,18 @@ var start_local_server = function() {
167167 subpy . stderr . on ( 'data' , function ( buf ) {
168168 console . log ( '[STR] stderr "%s"' , String ( buf ) ) ;
169169 fs . appendFile ( __dirname + path . sep + "python_error.log" , String ( buf ) , function ( err ) {
170- if ( err ) {
171- return console . log ( err ) ;
172- }
170+ if ( err ) {
171+ return console . log ( err ) ;
172+ }
173173 } ) ;
174174 stderr += buf ;
175175 } ) ;
176176 subpy . on ( 'error' , function ( err ) {
177177 console . log ( 'Python error %s' , String ( err ) ) ;
178178 fs . appendFile ( __dirname + path . sep + "python_error.log" , String ( err ) , function ( error ) {
179- if ( error ) {
180- return console . log ( error ) ;
181- }
179+ if ( error ) {
180+ return console . log ( error ) ;
181+ }
182182 } ) ;
183183 } ) ;
184184 subpy . on ( 'close' , function ( code ) {
@@ -192,12 +192,12 @@ var start_local_server = function() {
192192 mainWindow && mainWindow . webContents . executeJavaScript ( "console.log('Unable to find OpenBazaar-Server at: '" + serverPath + "')" ) ;
193193 }
194194 if ( fs . existsSync ( __dirname + path . sep + '..' + path . sep + 'gpg' ) ) {
195- process . env . PATH = __dirname + path . sep + '..' + path . sep + 'gpg' + path . sep + 'pub' + path . sep + ';' + process . env . PATH ;
196- }
195+ process . env . PATH = __dirname + path . sep + '..' + path . sep + 'gpg' + path . sep + 'pub' + path . sep + ';' + process . env . PATH ;
196+ }
197197} ;
198198
199199// Check if we need to kick off the python server-daemon (Desktop app)
200- if ( fs . existsSync ( __dirname + path . sep + ".." + path . sep + "OpenBazaar-Server" + path . sep + daemon ) ) {
200+ if ( fs . existsSync ( __dirname + path . sep + ".." + path . sep + "OpenBazaar-Server" + path . sep + daemon ) ) {
201201 global . launched_from_installer = launched_from_installer = true ;
202202}
203203
@@ -319,11 +319,11 @@ app.on('window-all-closed', function() {
319319
320320// You can use 'before-quit' instead of (or with) the close event
321321app . on ( 'before-quit' , function ( ) {
322- // Handle menu-item or keyboard shortcut quit here
323- console . log ( 'Closing Application' ) ;
324- if ( launched_from_installer ) {
325- kill_local_server ( ) ;
326- }
322+ // Handle menu-item or keyboard shortcut quit here
323+ console . log ( 'Closing Application' ) ;
324+ if ( launched_from_installer ) {
325+ kill_local_server ( ) ;
326+ }
327327} ) ;
328328
329329app . commandLine . appendSwitch ( 'ignore-certificate-errors' , true ) ;
@@ -518,15 +518,15 @@ app.on('ready', function() {
518518 ]
519519 } ,
520520 {
521- label : 'Window' ,
522- submenu : [
523- {
524- label : 'Minimize' ,
525- selector : 'performMiniaturize:' ,
526- accelerator : 'Command+M'
527- }
528- ]
529- }
521+ label : 'Window' ,
522+ submenu : [
523+ {
524+ label : 'Minimize' ,
525+ selector : 'performMiniaturize:' ,
526+ accelerator : 'Command+M'
527+ }
528+ ]
529+ }
530530 ] ) ;
531531 menu . setApplicationMenu ( appMenu ) ;
532532
@@ -537,8 +537,8 @@ app.on('ready', function() {
537537 var template = [
538538 {
539539 label : 'Start Local Server' , type : 'normal' , click : function ( ) {
540- start_local_server ( ) ;
541- }
540+ start_local_server ( ) ;
541+ }
542542 } ,
543543 {
544544 label : 'Shutdown Local Server' , type : 'normal' , click : function ( ) {
@@ -579,7 +579,7 @@ app.on('ready', function() {
579579 } }
580580 ] ;
581581
582- if ( launched_from_installer ) {
582+ if ( launched_from_installer ) {
583583 template . push ( { label : 'View Python Error Log' , type : 'normal' , click : function ( ) {
584584 var logPath = __dirname + path . sep + 'python_error.log' ;
585585 open ( logPath ) ;
@@ -615,7 +615,7 @@ app.on('ready', function() {
615615 } ) ;
616616
617617 // and load the index.html of the app.
618- if ( open_url ) {
618+ if ( open_url ) {
619619 mainWindow . loadURL ( 'file://' + __dirname + '/index.html' + open_url ) ;
620620 } else {
621621 mainWindow . loadURL ( 'file://' + __dirname + '/index.html' ) ;
@@ -666,13 +666,13 @@ app.on('ready', function() {
666666 } ) ;
667667
668668 var feedURL = 'https://updates.openbazaar.org:5001/update/' + platform + '/' + version ;
669- autoUpdater . setFeedURL ( feedURL )
669+ autoUpdater . setFeedURL ( feedURL ) ;
670670 mainWindow . webContents . executeJavaScript ( "console.log('Checking for new versions at " + feedURL + " ...')" ) ;
671671
672672 // Check for updates every hour
673673 autoUpdater . checkForUpdates ( ) ;
674674 setInterval ( function ( ) {
675- autoUpdater . checkForUpdates ( ) ;
675+ autoUpdater . checkForUpdates ( ) ;
676676 } , 3600000 ) ;
677677
678678} ) ;
0 commit comments