File: 04_use_config_when_daemon.diff

package info (click to toggle)
sabnzbdplus 2.3.6+dfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster, sid
  • size: 13,608 kB
  • sloc: python: 42,808; sh: 95; makefile: 47
file content (25 lines) | stat: -rw-r--r-- 971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Use the normal configuration when run as a daemon
--- a/SABnzbd.py
+++ b/SABnzbd.py
@@ -328,20 +328,7 @@
 def GetProfileInfo(vista_plus):
     """ 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:
         try:
             from win32com.shell import shell, shellcon
             path = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, None, 0)