[tor-commits] [arm/master] fix: wizard showed wrong torrc path for sys torrc

atagar at torproject.org atagar at torproject.org
Sun Sep 25 00:01:54 UTC 2011


commit 458073c58d103b8dc633b36f56d77602865911e7
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Sep 24 14:33:25 2011 -0700

    fix: wizard showed wrong torrc path for sys torrc
    
    When the user opts for the generated torrc to be for the system instance the
    wizard shows the wrong path in the confirmation panel.
---
 src/cli/wizard.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cli/wizard.py b/src/cli/wizard.py
index 4cb65ad..da4e645 100644
--- a/src/cli/wizard.py
+++ b/src/cli/wizard.py
@@ -356,15 +356,15 @@ def showWizard():
         generatedTorrc = getTorrc(relayType, config, disabledOpt)
         
         torrcLocation = manager.getTorrcPath()
+        isSystemReplace = not Options.SYSTEM in disabledOpt and config[Options.SYSTEM].getValue()
+        if isSystemReplace: torrcLocation = SYSTEM_DROP_PATH
+        
         controller.redraw()
         confirmationSelection = showConfirmationDialog(generatedTorrc, torrcLocation)
         
         if confirmationSelection == NEXT:
           log.log(log.INFO, "Writing torrc to '%s':\n%s" % (torrcLocation, generatedTorrc))
           
-          isSystemReplace = not Options.SYSTEM in disabledOpt and config[Options.SYSTEM].getValue()
-          if isSystemReplace: torrcLocation = SYSTEM_DROP_PATH
-          
           # if the torrc already exists then save it to a _bak file
           isBackedUp = False
           if os.path.exists(torrcLocation) and not isSystemReplace:





More information about the tor-commits mailing list