[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [bridgedb/master] Fix #2556. Thanks to karsten for reporting.



commit 90538bab4f7dc976fa993f761d0c906f095197b2
Author: Christian Fromme <kaner@xxxxxxxxxx>
Date:   Tue Feb 15 19:45:49 2011 +0100

    Fix #2556. Thanks to karsten for reporting.
---
 lib/bridgedb/Main.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 0e68fe9..5959a41 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -208,10 +208,6 @@ def startup(cfg):
     else:
         cfg.PROXY_LIST_FILES = [ ]
 
-    # Change to the directory where we're supposed to run.
-    if cfg.RUN_IN_DIR:
-        os.chdir(cfg.RUN_IN_DIR)
-
     # Write the pidfile.
     if cfg.PIDFILE:
         f = open(cfg.PIDFILE, 'w')
@@ -341,6 +337,10 @@ def run():
         C = Conf(**configuration)
         configuration = C
 
+    # Change to the directory where we're supposed to run.
+    if configuration.RUN_IN_DIR:
+        os.chdir(os.path.expanduser(configuration.RUN_IN_DIR))
+
     if options.dumpbridges:
         bucketManager = Bucket.BucketManager(configuration)
         bucketManager.assignBridgesToBuckets()