 applications/utilities/preProcessing/mapFields/createTimes.H | 6 ++++++
 applications/utilities/preProcessing/mapFields/mapFields.C   | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/applications/utilities/preProcessing/mapFields/createTimes.H b/applications/utilities/preProcessing/mapFields/createTimes.H
index 91e6a34..bcac99a 100644
--- a/applications/utilities/preProcessing/mapFields/createTimes.H
+++ b/applications/utilities/preProcessing/mapFields/createTimes.H
@@ -1,11 +1,17 @@
     Info<< "\nCreate databases as time" << endl;
 
+    const auto caseDirOrig = getEnv("FOAM_CASE");
+    const auto caseNameOrig = getEnv("FOAM_CASE_NAME");
+    setEnv("FOAM_CASE", rootDirSource/caseDirSource, true);
+    setEnv("FOAM_CASE_NAME", caseDirSource, true);
     Time runTimeSource
     (
         Time::controlDictName,
         rootDirSource,
         caseDirSource
     );
+    setEnv("FOAM_CASE", caseDirOrig, true);
+    setEnv("FOAM_CASE_NAME", caseNameOrig, true);
 
     Time runTimeTarget
     (
diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C
index 16e70e8..1dca92e 100644
--- a/applications/utilities/preProcessing/mapFields/mapFields.C
+++ b/applications/utilities/preProcessing/mapFields/mapFields.C
@@ -236,8 +236,8 @@ int main(int argc, char *argv[])
     fileName rootDirTarget(args.rootPath());
     fileName caseDirTarget(args.globalCaseName());
 
-    const fileName casePath = args[1];
-    const fileName rootDirSource = casePath.path();
+    fileName casePath = args[1];
+    const fileName rootDirSource = casePath.path().toAbsolute();
     const fileName caseDirSource = casePath.name();
 
     Info<< "Source: " << rootDirSource << " " << caseDirSource << endl;
