sabnzbdplus (0.5.4-1) 04_use_config_when_daemon.dpatch

Summary

 SABnzbd.py |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_use_config_when_daemon.dpatch by JCF Ploemen (jcfp) <linux@jp.pp.ru>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: use the normal configuration when run as a daemon

@DPATCH@
diff -urNad sabnzbdplus-0.5.0~alpha3~/SABnzbd.py sabnzbdplus-0.5.0~alpha3/SABnzbd.py
--- sabnzbdplus-0.5.0~alpha3~/SABnzbd.py	2009-06-03 20:59:44.000000000 +0200
+++ sabnzbdplus-0.5.0~alpha3/SABnzbd.py	2009-06-03 21:01:09.000000000 +0200
@@ -284,20 +284,7 @@
     """ Get the default data locations
     """
     ok = False
-    if sabnzbd.DAEMON:
-        # In daemon mode, do not try to access the user profile
-        # just assume that everything defaults to the program dir
-        sabnzbd.DIR_APPDATA = sabnzbd.DIR_PROG
-        sabnzbd.DIR_LCLDATA = sabnzbd.DIR_PROG
-        sabnzbd.DIR_HOME = sabnzbd.DIR_PROG
-        if sabnzbd.WIN32:
-            # Ignore Win32 "logoff" signal
-            # This should work, but it doesn't
-            # Instead the signal_handler will ignore the "logoff" signal
-            #signal.signal(5, signal.SIG_IGN)
-            pass
-        ok = True
-    elif sabnzbd.WIN32:
+    if sabnzbd.WIN32:
         specials = get_user_shellfolders()
         try:
             sabnzbd.DIR_APPDATA = '%s\\%s' % (specials['AppData'], DEF_WORKDIR)