Skip to content

Commit 59658d0

Browse files
committed
Move Tor config generation code into Tor_Initialize
1 parent 0566c06 commit 59658d0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ProxAllium.au3

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,6 @@ EndFunc
226226
#EndRegion GUI Functions
227227

228228
#Region Main Script
229-
If Not FileExists($g_sTorConfigFile) Then
230-
GUI_LogOut("Cannot find Tor configuration file, generating one now... ", False)
231-
Core_GenTorrc()
232-
If @error Then Core_WaitForExit("Failed to create configuration file!")
233-
GUI_LogOut("Successfully generated Tor configuration file!")
234-
EndIf
235-
236229
Tor_Initialize()
237230
If Not @error Then Tor_Start()
238231

@@ -652,6 +645,12 @@ Func Tor_Initialize()
652645
$g_aTorVersion = $aTorVersion
653646
GUI_LogOut("Detected Tor version: " & $g_aTorVersion[$TOR_VERSION])
654647
GUICtrlSetData($g_idMainGUI_TorVersion, $g_aTorVersion[$TOR_VERSION])
648+
If Not FileExists($g_sTorConfigFile) Then
649+
GUI_LogOut("Cannot find Tor configuration file, generating one now... ", False)
650+
Core_GenTorrc()
651+
If @error Then Core_WaitForExit("Failed to create configuration file!")
652+
GUI_LogOut("Successfully generated Tor configuration file!")
653+
EndIf
655654
Return True
656655
EndIf
657656
GUICtrlSetData($g_idMainGUI_TorVersion, '...')

0 commit comments

Comments
 (0)