Apply logfile patch for Windows build from Slurdge.
This commit is contained in:
parent
51bc2329c2
commit
1e65e4e396
|
@ -54,6 +54,10 @@ parser.add_option("-c", "--config", dest="config", help="Sets the configuration
|
||||||
if (options.config != None):
|
if (options.config != None):
|
||||||
deluge.common.CONFIG_DIR = options.config
|
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():
|
def upgrade_old_persistent_state():
|
||||||
pstate_file_path = os.path.join(deluge.common.CONFIG_DIR,
|
pstate_file_path = os.path.join(deluge.common.CONFIG_DIR,
|
||||||
deluge.core.STATE_FILENAME)
|
deluge.core.STATE_FILENAME)
|
||||||
|
|
|
@ -48,8 +48,6 @@ import sys
|
||||||
if hasattr(sys, "frozen"):
|
if hasattr(sys, "frozen"):
|
||||||
INSTALL_PREFIX = ''
|
INSTALL_PREFIX = ''
|
||||||
os.chdir(os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( ))))
|
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:
|
else:
|
||||||
# the necessary substitutions are made at installation time
|
# the necessary substitutions are made at installation time
|
||||||
INSTALL_PREFIX = '@datadir@'
|
INSTALL_PREFIX = '@datadir@'
|
||||||
|
|
Loading…
Reference in New Issue