summaryrefslogtreecommitdiff
path: root/app-admin/webapp-config/files/webapp-config-1.50.16-absolute-paths.patch
blob: c74fff9b2079d5f08d1ea4daa8da5cc28639878c (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Index: webapp-config-1.50.16/WebappConfig/config.py
===================================================================
--- webapp-config-1.50.16.orig/WebappConfig/config.py
+++ webapp-config-1.50.16/WebappConfig/config.py
@@ -204,6 +204,7 @@ class Config:
             pass
 
         self.__d = {
+            'allow_absolute'               : 'no',
             'config_protect'               : wrapper.config_protect,
             # Necessary to load the config file
             'my_etcconfig'                 : '/etc/vhosts/webapp-config',
@@ -870,8 +871,13 @@ class Config:
         #
         # this makes sure we don't write rubbish into the installs list
 
-        installpath = self.config.get('USER', 'g_htdocsdir') + '/' +     \
-                      self.config.get('USER', 'g_installdir')
+        g_installdir = self.config.get('USER', 'g_installdir')
+
+        if (os.path.isabs(g_installdir)
+            and self.config.get('USER', 'allow_absolute') == 'yes'):
+            installpath = g_installdir
+        else:
+            installpath = self.config.get('USER', 'g_htdocsdir') + '/' + g_installdir
 
         installpath = re.compile('/+').sub('/', self.__root + installpath)
 
Index: webapp-config-1.50.16/config/webapp-config
===================================================================
--- webapp-config-1.50.16.orig/config/webapp-config
+++ webapp-config-1.50.16/config/webapp-config
@@ -183,6 +183,9 @@ vhost_perms_virtualowned_file="o-w"
 
 vhost_perms_installdir="0755"
 
+# Allow specifying absolute path names using the -d option?
+allow_absolute="no"
+
 
 # ========================================================================
 # END OF USER-EDITABLE SETTINGS