From 43d15fe2c2ecc570ad5edfba0e75ae9b22ac2080 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Thu, 6 Apr 2023 08:06:34 +0200
Subject: Fix a bug with moved DLLs and current deSolve

In mkinmod, dll_info was not included in the returned model object
in the case that the DLL was moved to a user defined directory.
This is now fixed.
---
 R/mkinmod.R | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'R')

diff --git a/R/mkinmod.R b/R/mkinmod.R
index 215dbed6..29542b71 100644
--- a/R/mkinmod.R
+++ b/R/mkinmod.R
@@ -464,13 +464,12 @@ mkinmod <- function(..., use_of_ff = "max", name = NULL,
       silent = TRUE)
 
     if (!inherits(model$cf, "try-error")) {
-      if (is.null(dll_dir)) {
-        if (!quiet) message("Temporary DLL for differentials generated and loaded")
-        model$dll_info <- inline::getDynLib(model$cf)
-      } else {
+      if (!is.null(dll_dir)) {
         model$dll_info <- inline::moveDLL(model$cf, name, dll_dir,
           unload = unload, overwrite = overwrite, verbose = !quiet)
       }
+      if (!quiet) message("Temporary DLL for differentials generated and loaded")
+      model$dll_info <- inline::getDynLib(model$cf)
     }
   }
   # }}}
-- 
cgit v1.2.1