Merge branch 'readonly_config'
[exim.git] / src / src / transports / appendfile.c
index da261879039b5b061137aaf3c89d12aacd7880db..2d008d97d7915db65dd5fe6b7211e8e9478a892c 100644 (file)
@@ -175,7 +175,7 @@ Returns:     OK, FAIL, or DEFER
 */
 
 void
-openlogs();
+open_logs(void);
 
 static int
 appendfile_transport_setup(transport_instance *tblock, address_item *addrlist,
@@ -192,7 +192,7 @@ uid = uid;
 gid = gid;
 
 /* we can't wait until we're not privileged anymore */
-open_logs("appendfile");
+open_logs();
 
 if (ob->expand_maildir_use_size_file)
        ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file,
@@ -1368,8 +1368,8 @@ if (!isdirectory)
   if (ob->create_directory && allow_creation_here)
     {
     uschar *p = Ustrrchr(path, '/');
-    *p = '\0';
-    if (!directory_make(NULL, path, ob->dirmode, FALSE))
+    p = string_copyn(path, p - path);
+    if (!directory_make(NULL, p, ob->dirmode, FALSE))
       {
       addr->basic_errno = errno;
       addr->message =
@@ -1378,7 +1378,6 @@ if (!isdirectory)
       DEBUG(D_transport) debug_printf("%s transport: %s\n", tblock->name, path);
       return FALSE;
       }
-    *p = '/';
     }
 
   /* If file_format is set we must check that any existing file matches one of