Add directory name as new arg to EXIM_DBOPEN
[exim.git] / src / src / transports / autoreply.c
index 2f0efaa553ab0571f24bebc8a468d24be2561566..4a3fe47145c8e26be57fe774b041d29e7f5915fc 100644 (file)
@@ -495,7 +495,11 @@ if (oncelog != NULL && *oncelog != 0 && to != NULL)
   else
     {
     EXIM_DATUM key_datum, result_datum;
-    EXIM_DBOPEN(oncelog, O_RDWR|O_CREAT, ob->mode, &dbm_file);
+    uschar * dirname = string_copy(oncelog);
+    uschar * s;
+
+    if ((s = Ustrrchr(dirname, '/'))) *s = '\0';
+    EXIM_DBOPEN(oncelog, dirname, O_RDWR|O_CREAT, ob->mode, &dbm_file);
     if (!dbm_file)
       {
       addr->transport_return = DEFER;