]> git.pld-linux.org Git - packages/bogofilter.git/blobdiff - bogofilter-home_etc.patch
- updated to 1.2.5
[packages/bogofilter.git] / bogofilter-home_etc.patch
index 78f1949908c85b3c47c706b01902701d70ed6b1f..47819a6595a725768a3bde40bbc671b434ed058a 100644 (file)
@@ -1,24 +1,24 @@
-diff -Nru bogofilter-0.15.8.orig/src/configfile.c bogofilter-0.15.8/src/configfile.c
---- bogofilter-0.15.8.orig/src/configfile.c    2003-10-06 00:01:40.000000000 +0200
-+++ bogofilter-0.15.8/src/configfile.c 2003-11-12 18:12:59.000000000 +0100
-@@ -195,8 +195,14 @@
+diff -urN bogofilter-0.96.4.orig/src/configfile.c bogofilter-0.96.4/src/configfile.c
+--- bogofilter-0.96.4.orig/src/configfile.c    2005-10-15 23:03:11.000000000 +0200
++++ bogofilter-0.96.4/src/configfile.c 2005-11-03 16:26:38.844514992 +0100
+@@ -148,7 +148,13 @@
+     bool ok = true;
+     int lineno = 0;
      FILE *fp;
-     char *filename;
-     char *arg = NULL, *val = NULL;
-+    char *home_etc = getenv("HOME_ETC");              
--    filename = tildeexpand(fname, tilde_expand);
+-
++    char *home_etc = getenv("HOME_ETC");
 +    if (home_etc && fname[0] == '~') {
-+      char buffer[1024];
-+      
-+      snprintf(buffer, 1024, "%s%s", home_etc, fname + 1);
-+      filename = xstrdup(buffer);
-+    } else filename = tildeexpand(fname, tilde_expand);
-     fp = fopen(filename, "r");
++       char buffer[1024];
++       snprintf(buffer, 1024, "%s%s", home_etc, fname+1);
++       config_file_name=xstrdup(buffer);
++    } else
++   
+     if (config_file_name != NULL)
+       xfree(config_file_name);
  
---- bogofilter-0.15.8.orig/src/paths.c 2003-09-30 00:31:20.000000000 +0200
-+++ bogofilter-0.15.8/src/paths.c      2003-11-12 18:27:10.000000000 +0100
+diff -urN bogofilter-0.96.4.orig/src/paths.c bogofilter-0.96.4/src/paths.c
+--- bogofilter-0.96.4.orig/src/paths.c 2005-08-15 01:03:42.000000000 +0200
++++ bogofilter-0.96.4/src/paths.c      2005-11-03 16:28:51.672322096 +0100
 @@ -29,7 +29,7 @@
  #ifndef __riscos__
      { PR_ENV_BOGO, "BOGOFILTER_DIR", NULL },
@@ -28,11 +28,11 @@ diff -Nru bogofilter-0.15.8.orig/src/configfile.c bogofilter-0.15.8/src/configfi
  #else
      { PR_ENV_HOME, "Choices$Write",  BOGODIR },
      { PR_ENV_HOME, "Bogofilter$Dir", NULL },
-@@ -91,6 +91,7 @@
+@@ -274,6 +274,7 @@
      size_t path_size, env_size;
  
      env = getenv(var);
-+    if (env == NULL && strcmp(var, "HOME_ETC") == 0) env = getenv("HOME"); 
-     if (env == NULL || strlen(env) == 0) return NULL;
++    if (env == NULL && strcmp(var, "HOME_ETC") == 0) env = getenv("HOME");
+     if (env == NULL || *env == '\0') return NULL;
  
      env_size = strlen(env);
This page took 0.05715 seconds and 4 git commands to generate.