diff options
author | Andrew Resch <andrewresch@gmail.com> | 2007-11-25 12:16:29 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2007-11-25 12:16:29 +0000 |
commit | 1e65e4e3960932bf4429e696c298a8a7e5c46ceb (patch) | |
tree | ef644425b5e0e84cd27d35df6e8c48dec64528a6 | |
parent | 51bc2329c2c5a0522592748df6e079370d54b571 (diff) | |
download | deluge-1e65e4e3960932bf4429e696c298a8a7e5c46ceb.tar.gz deluge-1e65e4e3960932bf4429e696c298a8a7e5c46ceb.tar.bz2 deluge-1e65e4e3960932bf4429e696c298a8a7e5c46ceb.zip |
Apply logfile patch for Windows build from Slurdge.
-rwxr-xr-x | scripts/deluge | 4 | ||||
-rw-r--r-- | src/common.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/deluge b/scripts/deluge index b0a942c67..a8a607e32 100755 --- a/scripts/deluge +++ b/scripts/deluge @@ -54,6 +54,10 @@ parser.add_option("-c", "--config", dest="config", help="Sets the configuration if (options.config != None): deluge.common.CONFIG_DIR = options.config +if hasattr(sys, "frozen"): + sys.stdout = open(os.path.join(deluge.common.CONFIG_DIR,"deluge.stdout.log"), "w") + sys.stderr = open(os.path.join(deluge.common.CONFIG_DIR,"deluge.stderr.log"), "w") + def upgrade_old_persistent_state(): pstate_file_path = os.path.join(deluge.common.CONFIG_DIR, deluge.core.STATE_FILENAME) diff --git a/src/common.py b/src/common.py index 12f593618..82a64eaa7 100644 --- a/src/common.py +++ b/src/common.py @@ -48,8 +48,6 @@ import sys if hasattr(sys, "frozen"): INSTALL_PREFIX = '' os.chdir(os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( )))) - sys.stdout = open("deluge.stdout.log", "w") - sys.stderr = open("deluge.stderr.log", "w") else: # the necessary substitutions are made at installation time INSTALL_PREFIX = '@datadir@' |